I have a number string: 123456, I want it to look like 123,456 in
English, and in German its 123.456

Wt::WLocale myString = Wt::WLocale("de_DE"); // Actually I did not see
any difference from setting it to en_US, the Group Separator is not set
in either case
double myHits = 123456;

// Unless I set this, I get a 123456, but do I have to have a switch
statement to change the Group Separator?
myString.setGroupSeparator(",");
std::string myReturn = myString.toString(myHits).toUTF8();

// Separator is blank
myString.setGroupSeparator(myString.groupSeparator());

If I use std::locale I need to have the Locale installed and configure
on the server, and I was hoping to get away with not having to do that.

Thanks
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to