Thanks, but I would like to avoid an .xib file.
However, like you suggested I have created a new Cocoa app in Xcode, and I look 
at its content as a basis for creating the menubar programmatically.

Still, this doesn’t doesn’t solve the localization.
It seems Carbon does the localization, but Cocoa apps do not have that feature.
If I run a Cocoa app with Danish as my Preferred Language, the application menu 
has the English “Show Others”,
where a Carbon app would display “Skjul andre”.
/Lars


> Den 23. aug. 2018 kl. 02.03 skrev Rob Petrovec <petr...@mac.com>:
> 
> You should use a .xib instead of creating the menu bar programatically.  
> Create a new Cocoa App in Xcode and it will have all of what you seek 
> pre-configured in a .xib with no code needed.
> 
> —Rob
> 
> 
>> On Aug 22, 2018, at 2:14 PM, Lars C. Hassing <l...@ccieurope.com> wrote:
>> 
>> In decarbonizing I have now come to creating a menubar programmatically 
>> using NSMenu.
>> 
>> Carbon seems to be so nice to add standard items to the application menu: 
>> Services, Hide app, Hide Others, Show All, Quit app,
>> and they are added using the user’s Preferred Language setting in System 
>> Preferences’s Language & Region,
>> so in German “Hide Others” is added as “Andere ausblenden”.
>> 
>> However, it seems that in Cocoa I have to add these standard items myself,
>> but how can I find out what “Hide Others” is called in the user’s Preferred 
>> Language ?
>> 
>> And what is the Cocoa equivalent of CreateStandardWindowMenu ?
>> /Lars
>> 
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> Carbon-dev mailing list      (Carbon-dev@lists.apple.com)
>> Help/Unsubscribe/Update your Subscription:
>> https://lists.apple.com/mailman/options/carbon-dev/petrock%40mac.com
>> 
>> This email sent to petr...@mac.com
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (Carbon-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/carbon-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to