To load localized versions of help fles (e.g. fr/Intro.lyx instead of Intro.lyx), the code in i18nLibFileSearch tries to mimic what gettext does, by looking up some environment variables. However, this does not work for modern gettext, which call system-specific APIs on mac and windows.

Therefore I resort to a trick: in fr.po, for example, there is an entry like:

msgid "[[Replace with the code of your language]]"
msgstr "fr"

Therefore, when this po files is loaded, I can get its name!

I still let the LANGUAGE variable override everything to allow people to enter language preferences like
LANGUAGE="fr:es"

The language preferences entered in the mac preference panel are not taken in account, but this is not
a regression.

As always, comments welcome. The effect of this patch should be neutral on all platforms but the mac. On the mac, it should load the right help files when the transl1- v1.diff patch is used (or when building
--without-included-gettext).

JMarc

Attachment: transl3-v1.diff
Description: Binary data

Reply via email to