[fpc-devel] GetText's GetLanguageIDs()
Ales Katona
almindor at gmail.com
Sat Mar 1 11:47:35 CET 2008
Graeme Geldenhuys wrote / napĂsal(a):
I use getText in my game and I strip anything after 2 chars since I
consider only the 2 char lang codes to be valid. Depends I guess...
Ales
> Hi
>
> I'm working on localization for the fpGUI project. My idea is for the
> fpGUI toolkit to look for "fpgui.%s.po" files. Where %s is the
> language ID. e.g.: 'en' or 'af_ZA' or 'en_GB' etc.
>
> Under Ubuntu Linux, if I call GetLanguageIDs() it returns the following two IDs.
>
> SystemLanguageID1 = en_ZA.UTF-8
> SystemLanguageID2 = en
>
> The problem here is the '.UTF-8' part. Normally the translation (.po)
> files look like the following. 'fpgui.en.po' or 'fpgui.af_ZA.po' etc.
> It never contains the '.UTF-8' part in the po files. So in the case of
> the Afrikaans translation (af_ZA), the .po file is never found. Am I
> supposed to handle that, by maybe looking for the '.UTF-8' part and
> stripping it, or can we extend GetLanguageIDs() to return 3 IDs
> instead?
>
> SystemLanguageID1 = en_ZA.UTF-8
> SystemLanguageID2 = en_ZA (stripping anything from the . onwards)
> SystemLanguageID3 = en (stripping anything from the _ onwards)
>
>
> Regards,
> - Graeme -
>
>
> _______________________________________________
> fpGUI - a cross-platform Free Pascal GUI toolkit
> http://opensoft.homeip.net/fpgui/
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
More information about the fpc-devel
mailing list