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

Support language fallbacks #104

Open
rankun203 opened this issue Apr 12, 2017 · 4 comments
Open

Support language fallbacks #104

rankun203 opened this issue Apr 12, 2017 · 4 comments

Comments

@rankun203
Copy link

rankun203 commented Apr 12, 2017

Looking for a way to fallback en-* to en.

We have en language translated, but we don't have language files of en-US, en-CA etc.

[DOESN'T WORK] Right now we can only define all locales like this:

locales: ['en', 'en-us', 'en-gb', 'en-au', 'en-ca', 'en-nz', 'en-ie', 'en-za', 'en-jm', 'en-bz', 'en-tt']

Then have the base function to slice all locales base: locale => locale.slice(0, 2).

However this isn't ideal, it would be better to support fallbacks officially.

@rankun203
Copy link
Author

rankun203 commented Apr 12, 2017

Actually last try doesn't work at all.

Now we are using soft links (en-*.json -> en.json).

@BirgitPohl
Copy link

I have a use case for a fallback from de to en. And yes, in both cases I want to support de and en not being specific about a certain area.

@rankun203
Copy link
Author

rankun203 commented Jul 19, 2017

UPDATE: Soft links are also not working.

@gjuchault
Copy link
Collaborator

As I don't really have much time for this project, I'd say PR welcome :)

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

3 participants