Bug #3548
closedWEnvironment.locale().name() returns en-US, not en_US
Description
WEnvironment.locale().name() returns en-US instead of en_US like the documentation states.
It should use the underscore to be consistent with documentation.
I use this value in my Application to set the current Language, so its important that it be consistent.
Updated by Josh Lampco over 10 years ago
Jeff,
I am not sure where in the documentation you see the locale being specified to return in the format "en_US" (Can you give an example?). If you did find it somewhere that I haven't seen, the documentation should probably be changed since the format of the HTTP Accept-Language
(Per RFC-2616) header field is of the form "en-US".
The only references to this that I find in the documentation are as follows:
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WEnvironment.html#a4cef23ba35922901071ad036df1da434
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1WLocale.html#a5871abbfbe5c67c4c7280683eecd4f7b
Updated by Jeff Flesher over 10 years ago
The Documentation I refer to is the header for WLocale, the constructor Documents for 3.3.3 state:
/* \brief Creates a locale by name.
- The locale name is a string such as "en" (for English) or "en_UK"
- (for UK English).
*/
I do agree that a - (dash) is correct, and it is what is being returned, so maybe change this to read en-GB (UK to GB should already be updated by Wim Dumon via mail list).
At the time I wrote this, I found conflicting information, due to the use of underscore vs dash, but my point is the documentation should match the value returned.
Updated by Josh Lampco over 10 years ago
Agreed. This should at least be a change to the documentation.
Updated by Josh Lampco over 10 years ago
This copy constructor doesn't seem to make it in the doxygen docs but I see what you mean now.
Updated by Koen Deforche about 10 years ago
- Status changed from New to Resolved
- Assignee set to Wim Dumon
- Target version set to 3.3.4
Updated by Koen Deforche about 10 years ago
- Status changed from Resolved to Closed