Wrong local message resource file
The documentation of WMessageResourceBundle::use says that the message file that is used depends on the application's locale, for example /path/to/name_fr.xml (for French). I believe the locale comes from the web-browser, unless I set it myself. If I use Opera, it is "en", whereas Firefox and Chrome both say "en-US". So the file name may be /path/to/name_en-US.xml. I set a breakpoint in WMessageResources::refresh() to find the locale being used.
Is the correct way to handle this that Wt strips away the country, or that I have some translations name_en, and some name_en-US?
I will get around for the time being this by setting my locale to "nb".
Updated by Koen Deforche over 7 years ago
- Status changed from New to Feedback
When locale is "en-US", Wt should consider files in the following order: name_en-US.xml, then name_en.xml. Wt will also use name.xml as a fallback for any string that isn't translated in a specific language file.
If you do not care about the US specific translations, then you should use a single file (name_en.xml) for all English users. Is this not the behavior you are seeing?