I'm displaying certain strings in my app in some places as regular case and in some places as upper case:
{% trans item.name %}
{% trans item.name.upper %}
I'm specifying translations using the .po/.mo files:
msgid "Welcome"
msgstr "歓迎"
And the translation seems to be case-sensitive. 'Welcome' gets translated to '歓迎' but 'WELCOME' does not get translated. Is there an easy way to get it to translate case insensitive? It seems like it would be cleaner than providing each of these translations twice.
The only "easy" way to do it is to always use either uppercase or lowercase strings and translate those. But as far as I know there is no support from either Django or Gettext for case insensitivity.
The question you should ask yourself is... is it really correct? I mean, in some languages the meaning of a word can change with casing. So I wonder if adding the capitalized translations automatically might be a better solution. That way you can atleast change them if it's needed for a specific language.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With