Project

General

Profile

Bug #2899

Wrong local message resource file

Added by Eivind Midtgård over 7 years ago. Updated over 7 years ago.

Status:
Feedback
Priority:
Low
Assignee:
-
Target version:
Start date:
04/03/2014
Due date:
% Done:

0%

Estimated time:

Description

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".

#1

Updated by Koen Deforche over 7 years ago

  • Status changed from New to Feedback

Hey,

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?

Regards,

koen

#2

Updated by Eivind Midtgård over 7 years ago

Hi Koen,

You are right: What I see is the described behaviour. My bug report is in error.

Regards,

Eivind

Also available in: Atom PDF