Project

General

Profile

Bug #3548

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

Added by Jeff Flesher almost 8 years ago. Updated almost 8 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.

#1

Updated by Josh Lampco almost 8 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

#2

Updated by Jeff Flesher almost 8 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.

#3

Updated by Josh Lampco almost 8 years ago

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

#4

Updated by Josh Lampco almost 8 years ago

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

#5

Updated by Koen Deforche almost 8 years ago

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

Updated by Koen Deforche almost 8 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF