i18n issue when translation equals original

Thiago Macieira thiago at kde.org
Sun Aug 5 23:59:45 BST 2007


Chusslove Illich wrote:
>Anyone have an idea how to positively determine at runtime whether
> message was translated or not? Without ditching gettext calls and
> making own code to parse catalogs, that is :)

Compare the pointer value.

If there was no translation, gettext() returns the original pointer.

If there was a translation, gettext() returns a pointer to the 
translation.

-- 
  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070805/f13c1857/attachment.sig>


More information about the kde-core-devel mailing list