fra290
(MArco)
1
hi all.
anybody have localize the output of strftime in lambda?
I want ot translate the name of days and months in italian
I have test this:
setlocale(LC_ALL, "it-IT");
it.strftime(X, Y, id(font), textAllign::TOP_CENTER, "%B", id(current_time).now());
no error in compiling but the text is alwais in english…
any idea?
h3ad
2
I have the same problem, do you have found a solution?
I’ve looked for this to no avail; and I’ve finally resorted to big ugly switch statements that return the proper string for each month & day.
Suboptimal, but it works. It kinda sucks that nobody seems to be thinking about languages other than English.
2 Likes
According to this page, one has to use
std::locale::global(std::locale("ja_JP.utf8"));
to set the locale. This does something, because the resulting binary then becomes too big