Using the Apple menu (Apple.laf.useScreenMenuBar) the menu items are always in English whatever set as Preferred Language
Petr Pchelko
petr.pchelko at oracle.com
Wed Dec 25 10:27:32 PST 2013
Hello, Paul.
> Thanks, my application is actually packaged using this fork of appbundler https://bitbucket.org/infinitekind/appbundler
>
> So will
> <key>CFBundleAllowMixedLocalizations</key>
>
> work for that as well ?
I’ve never tried to use this tool, so I do not know. But you could simply try that just by adding
<key>CFBundleAllowMixedLocalizations</key>
<true/>
to the Info.plist of a bundled app. I suppose it should work.
If it does not the javafxpackager is available in JDK8 EA builds and it works not only for JavaFX but for Swing applications too.
With best regards. Petr.
25 дек. 2013 г., в 10:23 после полудня, Paul Taylor <paul_t100 at fastmail.fm> написал(а):
> On 25/12/2013 13:26, Petr Pchelko wrote:
>> Hello, Paul.
>>
>> Sorry for the delayed answer.
>>
>> The problem is that we are relying on Cocoa to create these menu items. However, to properly understand the locale Cocoa needs a special key in the Info.plist file (CFBundleAllowMixedLocalizations). However when you are running a java application as java -jar … there’s no Info.plist file, so Cocoa does not use the locale preferences and displays everything in English. We have the same problem with a native FileDialog.
>>
>> The problem does not seem to be fixable internally in JDK, because there’s no API to tell Cocoa that we wish to use CFBundleAllowMixedLocalizations key. The only possible workaround right now is to use the javafxpackager tool and create a native bundle with your application. Bundled apps have an Info.plist and Cocoa localization works well with them.
>>
>> For more info please look at the following JDK bug: https://bugs.openjdk.java.net/browse/JDK-8019464 It’s about the FileDialog, but everything there applies to the default menu items as well.
>>
>> With best regards. Petr.
>>
> Thanks, my application is actually packaged using this fork of appbundler https://bitbucket.org/infinitekind/appbundler
>
> So will
> <key>CFBundleAllowMixedLocalizations</key>
>
> work for that as well ?
>
> paul
More information about the macosx-port-dev
mailing list