Skip to content

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

Open
@egor83

Description

@egor83

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions