Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] How to make the Mac generated menu entries language specific in RCP?

Hi Lars,

You could try the -AppleLanguage "(de)" command line argument to set
the language of native localized strings. Note the parentheses, the
value is actually a list of preferred languages.

-nl won't work because there is no API to set the current application
language on macOS.
Instead, the current language is derived from a list of preferred user
languages (the AppleLanguage setting) and a list of languages that the
main bundle supports (the CFBundleLocalizations key). The read-only
API for this is Bundle.main.preferredLocalizations.first.

AppleLanguage can be set globally and per application in the System
Preferences or overridden on the command line like the above example.

Another related setting is AppleLocale, which affects number/date
formatting etc. It also can be overridden on the command line, for
example: -AppleLocale de_DE.

I believe command line overrides are intended for localization testing
only and shouldn't be used in production.

On Wed, Jan 19, 2022 at 5:25 PM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
> Hello,
> We tried Alex suggestions with the help of the
> plug-in and the
> generated info.plist contains the following entries:
> <key>CFBundleLocalizations</key>
>     <array>
>         <string>English</string>
>         <string>French</string>
>         <string>German</string>
>     </array>
> See attachment for the complete file.
> We also tried with the language keys, as we saw that
> uses these keys. Unfortunately
> this app also does not translate the About, Preferences, Hide, Show
> all, Services. See attached screenshot.
> <key>CFBundleLocalizations</key>
>     <array>
>         <string>en</string>
>         <string>fr</string>
>         <string>de</string>
>     </array>
> For testing we added the "-nl de" as a fixed program argument.
> Does anyone know what we are missing?
> Best regards, Lars
> --
> Eclipse Platform project co-lead
> CEO vogella GmbH
> Haindaalwisch 17a, 22395 Hamburg
> Amtsgericht Hamburg: HRB 127058
> Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
> USt-IdNr.: DE284122352
> Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web:
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit

Best regards,
Nikita Nemkin

Back to the top