Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use language specified by web browser for guests #718

Closed
Silic0nS0ldier opened this issue May 25, 2017 · 2 comments
Closed

Use language specified by web browser for guests #718

Silic0nS0ldier opened this issue May 25, 2017 · 2 comments
Assignees
Labels
internationalization Related to the localization feature standards and best practices Coding guidelines
Milestone

Comments

@Silic0nS0ldier
Copy link
Member

We've got i18n support, but currently its only useful once you've signed in, since its tied to the account.

The expected behaviour is that UserFrosting will attempt to serve the language requested by the guests browser. Naturally, user account creation should also take into consideration the language requested by the browser.

@Silic0nS0ldier Silic0nS0ldier added internationalization Related to the localization feature standards and best practices Coding guidelines V4 labels May 25, 2017
@alexweissman alexweissman added this to the 4.1.x milestone May 30, 2017
@Silic0nS0ldier
Copy link
Member Author

Looking at the v4 code, this should be rather easy to implement.

Ideal approach would be to, when the translator is being set up in core, to override the loaded defaults via mergeItems. Both site.registration.user_defaults.locale and site.locales.default would need to be overridden.

The overriding value should first be sanity checked (as in, is it actually available).

Should be possible to grab the requested language via $_SERVER['HTTP_ACCEPT_LANGUAGE'].

@alexweissman alexweissman removed the V4 label Jul 14, 2017
@Silic0nS0ldier Silic0nS0ldier self-assigned this Dec 13, 2017
Silic0nS0ldier added a commit that referenced this issue Dec 14, 2017
- Fixed issue where language preference wasn't properly applied due to a bad type check.
- Added locales field to register page.
@Silic0nS0ldier
Copy link
Member Author

Sanity Desk checks and wider testing aside, this is all done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internationalization Related to the localization feature standards and best practices Coding guidelines
Projects
None yet
Development

No branches or pull requests

2 participants