--===============0733443304== Content-Type: multipart/signed; boundary="nextPart2397728.H7atZJivUy"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart2397728.H7atZJivUy Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable > [: Weng Xuetian :] > I need to load the existing translation of this input method and use it > KCM Module, and KDE's i18n series function seems not to have support like > gettext's dgettext (google result says that). Should I use dgettext > directly here? The short answer is yes, use dgettext() directly. It should work as usual, only remember to put somewhere bindtextdomain() call and configure its locale dir path at build. As for KDE i18n, there is also the ki18n() series, which enables explicit selection of domain: QString trmsg =3D ki18n("...").toString("foodomain"); But, KDE i18n puts some constraints on messages, like expecting them to be well-formed XML strings. So it should only be used to fetch messages from native KDE catalogs. > And another question.. How does KDE determine which Gettext file to use? > The same with the value specified in KAboutData ? Default calls (those not having that .toString(domain) above) look for the translation through all loaded catalogs within the process. Catalogs are loaded either by being specified in KAboutData, or by explicitly calling KLocale::global()->insertCatalog(). This was (in my opinion) a design mistake, since it can cause, and does cause in practice, wrong translation from underlying libraries to be fetched in a random app. It will hopefully be rectified in some future rehaul of KDE i18n API. =2D-=20 Chusslove Illich (=D0=A7=D0=B0=D1=81=D0=BB=D0=B0=D0=B2 =D0=98=D0=BB=D0=B8= =D1=9B) --nextPart2397728.H7atZJivUy Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAk4tLCQACgkQMSGXgigGr3FrBACdFmWy1mNUYeDd4jVHAMWCeWfy kFUAnj6lNSAIC9F9qnOIYzonM2oAGlKz =G3kH -----END PGP SIGNATURE----- --nextPart2397728.H7atZJivUy-- --===============0733443304== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============0733443304==--