Question about klocale.cpp / this_klocale

Heiko Evermann Heiko.Evermann at
Mon May 24 11:21:50 BST 2004

Hi Stephan,
> Am Sunday 23 May 2004 00:30 schrieb Heiko Evermann:
> > If this is supposed to have any effect, it can only be some kind of
> > specially designed side effect. What side effect is this?
> Your answer lies in
> The interaction between KLocale, KConfig, KGlobal and KInstance
> is very subtle and fragile. Good luck! I hope you already have a solution
> for which config entry to read from desktop files in your kauderwelsch
> environment (without slowing down KConfig usage in general).
I think that the desktop files are not the problem. If only the main
translation gets shown there, it would not matter so much.
The main problem is the huge number of incomplete po-files that we have
across many languages.

My idea is this:
* keep a list of all catalog names that we currently use. insertCatalogue
adds one name to this list. removeCatalogue removes a catalog name (this
list is new)
* keep a list of all languages that we currently use. setLanguages(
QStringList) replaces the current list. setLanguage(QString) prepends the
new language to the list
* any change to these two lists forces an update of the list of
KCalalogue-objects. This list then contains the product of names x
languages, ordered by language. e.g. ( (nds), (nds), (nds), (de), (de), (de) etc.
* to handle the plural forms correctly, KCatalogue will have a member
variable d->pluralType (integer). These plural types are set after loading
the catalog list, because then the kdelibs-files are loaded. Then we just
have to look up the plural type for language x by asking the KCatalogue
object that holds for language x. A call to KCatalogue::translate
passes back the translated string and the plural type that this catalog

Coding is about half-way through. I hope to have the whole thing running
before June 1st. 

Concerning the kauderwelsch remark:
Actually we already have a kauderwelsch environment. The problem is that the
only offer is a mixture of main language + english. This is not to everyones

I think the whole thing will not slow anything down for people who only use
one language. And it will greatly increase the usability for all the others.

Kind regards,

Heiko Evermann

NEU : GMX Internet.FreeDSL
Ab sofort DSL-Tarif ohne Grundgebühr:

More information about the kde-core-devel mailing list