Fwd: Using multiple klocales uses stale translations
caslav.ilic at gmx.net
Sun Nov 7 23:17:13 GMT 2010
> [: Stephen Kelly :]
> Clearly someone decided that should be commented out. Should what I am
> trying work already, or does that need to be uncommented?
It was I who both added and later commented out that code. As per the note,
I commented it out because I didn't think of the use case, even though
KLocalizedString::toString methods advertise the capability :) So it should
be uncommented, but let me first check what it will do to performance.
> KLocale de("kwrite", "de");
> kDebug() << de.formatDate(now, KLocale::ShortDate);
> kDebug() << fr.formatDate(now, KLocale::ShortDate);
> I always get the date in the system locale instead of de or fr. Shouldn't
> that work?
The second argument to KLocale constructor is the language, whereas the date
is determined by country, which is the third parameter. If the country
parameter is left out, it is fetched from "the system" (whatever that
means), hence what you are seeing.
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: This is a digitally signed message part.
More information about the kde-core-devel