cancel
Showing results for 
Search instead for 
Did you mean: 

After installing Lang pack, which lang setting gets english?

teemus
Champ in-the-making
Champ in-the-making
Background:
I have installed a translation pack for Share. Properties are in xx_XX format.

Problem:
I can't get default English translation anymore. I've tried 'en', 'en_EN' and 'en_US' settings and none works. If I replicate all default files to en_US format, then 'en_US' setting works and I can swap between English and custom Lang versions.

Question:
Which Lang setting (in browser) is needed to use default English translation after installing additional Lang packs? Or is dummy Lang pack which just replicates default files (*.properties => *en_US.properties) the only way to get this working?

EDIT:
Setting default locale to English for Share works too.
Locale.setDefault(Locale.ENGLISH);
4 REPLIES 4

gronfelt
Champ in-the-making
Champ in-the-making
If I select English as the preferred language in my browser I get the strings from the default files (the ones without any language and location codes). This works in Firefox at least, no matter if I select en or en-us as preferred language.

I have only one language pack installed, besides the default files and that language pack is non-english.

mrogers
Star Contributor
Star Contributor
Is it a typo en-us?    Should it not be an underscore character in a locale?.

gronfelt
Champ in-the-making
Champ in-the-making
Firefox calls it [en-us].

teemus
Champ in-the-making
Champ in-the-making
Is it a typo en-us?    Should it not be an underscore character in a locale?.
Firefox sends locales with hyphen but DispatcherServlet replaces '-' char with '_', so that's not a problem.

If I select English as the preferred language in my browser I get the strings from the default files (the ones without any language and location codes). This works in Firefox at least, no matter if I select en or en-us as preferred language.
That's because Share can't find translation you requested and defaults to default files (English in this case). I'm guessing your JVM's default locale is 'en_US'. Try to change it to say, se_SE.

But if your JVM's locale isn't en_US (or any en_XX?) you can't get English anymore. On Web Client (legacy(?) browser) v1 they had issue with same kind of problem. They solved it with build script that replicates all properties to en_US (don't remember for sure, but some English locale) files as well.