Eike Lange a écrit:
Hi Folks!
I'd like to improve the facilities of our `intl' unit which interfaces GNU Gettext. There is one little problem with it: The user of this unit might not know where to install and retrive the locale informations, needed by `BindTextDomain'.
- A common place under Unix like systems might be
/Executable-Path-Without-Bin/share/locale which is well defined for Linux.
- What about DJGPP, MinGW, CygWin, MacOS, ...?
Are there common rules to find the locale directory?
As a reference source code for this problem, you might want to have a look at `gettextdemo.pas'.
For DJGPP, in the program "GetTextTest.pas" of the test suite you read
LocaleDir := {$ifdef DJGPP} GetEnv ('$DJDIR') + '/share/locale' {$else} '/usr/share/locale' {$endif}; <...> s := BindTextDomain ('gettext', LocaleDir);
Is that you need ?
Maurice