Skip to content

Defaults back to 'en' #62

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

Closed
ziemerz opened this issue Sep 25, 2017 · 3 comments
Closed

Defaults back to 'en' #62

ziemerz opened this issue Sep 25, 2017 · 3 comments

Comments

@ziemerz
Copy link

ziemerz commented Sep 25, 2017

Hi

We want to make a kind of easter egg implementation of a part of our system and wanted to make custom language (like 'pirate').
When we do that, it seems like it defaults back to english though.
Is there some kind of check on the format of the languages provided?
I can imagine this could also be an issue if you wanted localisation (like en_GB and en_US).
What should the format of localisation be?

Suggestion
Would it be possible to remove that restriction if there are any?

@tflori
Copy link
Owner

tflori commented Sep 25, 2017

https://tflori.github.io/angular-translator/TranslatorConfig.html

Indeed there is a restriction because all languages (provided and chosen) are normalized to <two letter language>[[divider]<two letter region>].

You can internally name the language pr or something else that does not exist and map it somewhere. There was a reason behind this restriction and currently I don't know the reason. Maybe tomorrow I remember why 🤔

@tflori
Copy link
Owner

tflori commented Sep 26, 2017

The restriction was for non strict matching languages. I solved this problem otherwise and removed the restriction.

@tflori
Copy link
Owner

tflori commented Sep 26, 2017

please upgrade to 2.3.1. if this is still not working feel free to reopen the issue. thanks for your contribution!

@tflori tflori closed this as completed Sep 26, 2017
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

2 participants