Project

General

Profile

Actions

Bug #3548

closed
JF WD

WEnvironment.locale().name() returns en-US, not en_US

Bug #3548: WEnvironment.locale().name() returns en-US, not en_US

Added by Jeff Flesher about 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
08/27/2014
Due date:
% Done:

0%

Estimated time:

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.

JL Updated by Josh Lampco about 12 years ago Actions #1

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

JF Updated by Jeff Flesher about 12 years ago Actions #2

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.

JL Updated by Josh Lampco about 12 years ago Actions #3

Agreed. This should at least be a change to the documentation.

JL Updated by Josh Lampco about 12 years ago Actions #4

This copy constructor doesn't seem to make it in the doxygen docs but I see what you mean now.

KD Updated by Koen Deforche almost 12 years ago Actions #5

  • Status changed from New to Resolved
  • Assignee set to Wim Dumon
  • Target version set to 3.3.4

KD Updated by Koen Deforche almost 12 years ago Actions #6

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom