[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Fwd: Using multiple klocales uses stale translations
From:       Chusslove Illich <caslav.ilic () gmx ! net>
Date:       2010-11-07 23:17:13
Message-ID: 201011080017.15486.caslav.ilic () gmx ! net
[Download RAW message or body]


> [: 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 (Часлав Илић)

["signature.asc" (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic