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

Reflang might not work with locales longer than 2 symbols. #182

Open
egor83 opened this issue Mar 10, 2017 · 1 comment
Open

Reflang might not work with locales longer than 2 symbols. #182

egor83 opened this issue Mar 10, 2017 · 1 comment

Comments

@egor83
Copy link

egor83 commented Mar 10, 2017

Reflang works with 2-letter locales ('en', 'de', ...), but fails with longer ('zh_Hans', for instance).
I'll test some more, but I'm quite sure the problem lies here, line 214:
https://github.com/mbi/django-rosetta/pull/60/files#diff-b1b9cc9184baf1c5f4af99b915eb35e3R214
If locale being handled has name longer than 2 letters, it fails and falls back on msgid.
In our experience, switching from 'zh_Hans' to 'zh' helped.


  • Which version of Django are you using?:
    1.8.13

  • Which version of django-rosetta are you using?:
    0.7.12

  • Have you looked trough recent issues and checked this isn't a duplicate?
    Yes - searching for "locale" brings up a few solved issues, but these are about Rosetta in general, and not reflang.

@egor83
Copy link
Author

egor83 commented Mar 10, 2017

Reference language - added for discoverability.

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