Hi,
I searched GIMP API to get GIMP3 UI language, but I couldn’t found it.
Is there any API to get GIMP3 UI language or any way to get it?
AFAIK Gimp uses the standard stuff (LANG/LANGUAGE/LC_* environment variables).
In general you don’t need to know, you just tell Gimp where your language files are when the plugin is started (do_set_i18n() method in your plugin), and in practice you can just use gettext() directly, which has its good points.
Thank you!
It seems that if I use gettext, it is needed to provide the translation file as mo binary file.
I would like to use use plain text file as translation file because users can make their own translation files much easyer, so I tried other Implementation of translation in following program.
If you provide a general “.pot” file, there are plenty of open-source editors to create a translation from that. These also deal nicely with re-translations, so if you add or change labels in a future version, these tools will only show the things that require a new translation.
In addition the gettext() architecture handles nicely the language variants, if your language is fr_BE (belgian french) and you already have the fr (generic french) file, your fr_BE translations need only define the few labels that would be different in belgian french.
It is true for FOSS translation maintainers, however for general end-users?
Using something like poedit is fairly straightforward. If you user can’t understand how to use it, they won’t understand your instructions to translate using a plain editor either…