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

Package breaks custom language setting code #16

Open
derwaldgeist opened this issue Aug 22, 2017 · 0 comments
Open

Package breaks custom language setting code #16

derwaldgeist opened this issue Aug 22, 2017 · 0 comments

Comments

@derwaldgeist
Copy link

derwaldgeist commented Aug 22, 2017

I was wondering why my automatic browser language detection code wasn't working anymore. Tracing the TAPi18n.setLanguage() calls, I finally found out that this package was responsible for setting the language back to English.

Responsible for this behaviour is this line:
https://github.com/TAPevents/tap-i18n-ui/blob/master/i18n_ui_amplify.coffee#L12

I think it's a silly decision to brute-force set the language to the first language available. Why don't you just choose the language that TAPi18n itself reports by TAPi18n.getLanguage() instead? This wouldn't break custom code that ran before. Not everyone wants to use a default language for any user.

At least this behaviour should be clearly documented, especially if it is a breaking change.

In my case, I was setting the language in an Meteor.startup(), and just by chance a change in the app made my startup() code run before this package's startup() and hence was overruled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant