2

I have a java application that is packaged for macOS using jpackage tool from Oracle JDK 9.

When this application is executed on macOS Big Sur (11.6) on an iMac 2021 M1, the application menu does not get automatically translated into French (the System langage selected).

enter image description here

On the contrary, when the application is executed on a Macbook Air 2012 (Intel) on macOS Catalina 10.15.7, the application menu does get correctly translated in French (same .app file).

enter image description here


On both computer, the prefered language definied in System Preferences > Languages & Region is set to Français as the first (main language).

enter image description here

In my Info.plist file the CFBundleDevelopmentRegion key is correctly defined to fr-FR.

<key>CFBundleDevelopmentRegion</key>
<string>fr-FR</string>

Any idea about why it does not get translated properly ?

jtraulle
  • 74
  • 1
  • 5

1 Answers1

0

CFBundleDisplayName

In macOS, before displaying a localized name for your bundle, the Finder compares the value of this key against the actual name of your bundle in the file system. If the two names match, the Finder proceeds to display the localized name from the appropriate InfoPlist.strings file of your bundle. If the names do not match, the Finder displays the file-system name.

There might be a mismatch in the App Names. Make sure the name of the built .app file is the same as the name as CFBundleDisplayName in Info.Plist.

Max
  • 434
  • 1
  • 3
  • 13
  • Thanks. I do not have a `CFBundleDisplayName` in my `Info.plist` file but the `CFBundleName` key value matches the `.app` file name correctly. I do not understand however why it "works" on older macOS version and not Big Sur by the way... – jtraulle Oct 06 '21 at 10:52
  • The functionality likely changed in a newer update, but I'm not sure. Does it work when you add the Bundle Display Name? – Max Oct 06 '21 at 10:57
  • No, it does not work either. – jtraulle Oct 06 '21 at 11:24