In reference to Bug Report http://redmine.emweb.be/issues/3548
It just occurred to me that WLocale could be used to retrieve the
Servers Locale using another currently unknown function (not sure what
WApplication::instance()->locale().name() would return, but my guess is
that some function should return the servers locale), which en_US would
be valid, correct me if I am wrong, WEnvironment returns the Client
Browsers locale in the function env.locale().name(), which comes from
the header, which en-US would be correct, so the function works as is,
its just the documentation that needs to reflect this, if both are true,
then the Documentation should reflect both scenarios, since this would
mean that both en-US and en_US are correct values given different
function calls.
Its seems that this is where my confusion is coming from, since I do not
know which locale we are even talking about, and assumed that
WEnvironment is the Clients Browser Locale, and that WLocale was only
used to read from the Header, which brings up the question on how I can
return the Servers Locale? Since this would be useful in setting the
language of the log messages, assuming the server admins speak the same
language.
Thanks
Jeff Flesher
On Tue, 2014-08-26 at 18:34 +0200, Wim Dumon wrote:
> I think it's currently ill-defined, and we should solve that. Can you
> submit a bug report? The environment creates locale with a dash (-),
> while on Unix locales are typically written with an underscore (_). Wt
> seems to mix both. Currently the name of a locale is not really used
> afaik, so at the moment I don't think it matters.
>
>
>
> Wrt the GB vs UK, you're right, I corrected the example.
>
> Best regards,
> Wim.
>
>
>
>
>
> 2014-08-26 5:49 GMT+02:00 Jeffrey Scott Flesher Gmail
> <jeffrey.scott.fles...@gmail.com>:
>
> WLocale states:
> /* \brief Creates a locale by name.
> * The locale name is a string such as "en" (for English) or
> "en_UK" (for UK English).
>
> But UK locale code is GB, confusing, is this Correct or a
> Type?
>
> Also env.locale().name() returns en-US, not en_US, which is
> correct?
> Should it return with a Dash - or an underscore _ ?
>
> Thanks
> Jeff Flesher
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
>
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________ witty-interest mailing list
> witty-interest@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest