Default language for GIMP installed by MacPorts

Andrew Janke floss at apjanke.net
Fri Oct 4 00:07:25 UTC 2019



On 10/3/19 8:00 PM, Thomas R. Murphy wrote:
> Hello Macports Dev,
>
> I just got around to trying to use my MacPorts intstall of GIMP (gimp
> @2.10.12_0) and encountered the slight difficulty of it starting in
> Arabic using the default "system language" setting. I started it from
> the command line with export LANG=en_US.UTF-8 and switched it to default
> to en_US. My system language settings are "English (US) — Primary" with
> a customized region (for my desired date/time formatting) with Arabic,
> Khmer, and Urdu as alternates in that order (from who knows what
> keyboard fooling around I tried). Any idea what caused GIMP to skip down
> to my second language?
>
I suspect this has to do with how the GNU gettext internationalization
library is being used by GIMP. I've seen this happen with other programs.

gettext uses the following priorities for choosing a localized translation:

1. A localized translation in your primary language
2. A localized translation in one of your alternate languages, in
priority order
3. The original language of the program text

Probably what is happening is that GIMP provides localized translation
files for one or more languages in your alternate language list, but
does not define an English localization translation file (instead
relying on the fallback behavior to get English). In that case, gettext
will find that alternate-language localization in step 2, and it will
take precedence over the default-language fallback of English.

This could be fixed at the GIMP level by having it provide a dummy empty
localization file for English, which would be matched to your primary
language in step 1. Alternately, your $LANG workaround is effective.

Cheers,
Andrew


More information about the macports-dev mailing list