KLocale and rejecting languages if the application is not translated

Chusslove Illich caslav.ilic at gmx.net
Sun Jan 4 00:52:28 GMT 2009


> [: Aaron J. Seigo :]
> the cause of the problem is that the desktop:/ ioslave has no translatable
> strings (and is a QCoreApplication if that matters any?) and therefore
> when setLanguage is called on KLocale upon construction when calling
> KGlobal::locale(), the default local language is rejected.

I'm dud on ioslaves, but those in kdelibs/kioslave/ which are in the same
situation (no translation catalog of their own) point to an always existing
catalog and jump-start locales right away:

  // necessary to use other kio slaves
  KComponentData("kio_desktop", "kdelibs4");
  (void) KGlobal::locale();
  QCoreApplication app(argc, argv);

which did the trick for me for kio_desktop as well.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090104/6c25b17e/attachment.sig>


More information about the kde-core-devel mailing list