Did you intend acceptedLanguage to be a property attached to the i18n function?