Locale change and pop up menu

This forum is for general developer support questions.

Locale change and pop up menu

Postby mritter0 » Thu Nov 05, 2015 4:08 am

I was doing some language testing and thought my program wasn't working right and/or not allowing Workbench to fully change to the new locale.

Fresh boot. Nothing running.
English is my language.
Prefs -> Locale -> Clear languages -> pick German -> Save.
Windows refresh and look good, in German.
Right-click popup menus (Workbench, system windows) didn't change to German, still in English.
Top menu bar did.
Repeat with Danish.
Same result: popup menus not changing locale.

Same thing for the popup menu in the window title bar of my program (Close, Iconify, Jump to screen).

Reboot.
Popup menus are in the last saved language.

Switch to English, popups stay in previous language.
Workbench Explorer - A better way to browse drawers
User avatar
mritter0
 
Posts: 186
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA

Re: Locale change and pop up menu

Postby nbache » Thu Nov 05, 2015 10:48 pm

Are you using ContextMenus? (If you're not sure, you probably do; it is started by default on a fresh installation).

ContextMenus does not use the normal Locale functionality.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1226
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark

Re: Locale change and pop up menu

Postby mritter0 » Fri Nov 06, 2015 2:05 am

I don't mean in my program, I mean the Workbench backdrop window and the system windows (Prefs, Utilities, System, etc.). But in my program, when run after a locale change, the drop down menu in the title bar (Iconify, Jump to screen, etc.) does not change to the new language.

If ContextMenus don't "listen" for locale changes, maybe if they used a system like this http://forum.hyperion-entertainment.biz/viewtopic.php?f=36&t=3234 they might update.... ;)
Workbench Explorer - A better way to browse drawers
User avatar
mritter0
 
Posts: 186
Joined: Mon Aug 25, 2014 10:41 pm
Location: Bettendorf, IA, USA

Re: Locale change and pop up menu

Postby Daedalus » Fri Nov 06, 2015 11:09 am

The popup menus are a commodity and are therefore a separate program from the Workbench itself. This means they take care of their own strings. Whoever maintains the popup menu commodity could add a notification for locale changes, on which notification it could rebuild its strings to the new language and that would solve the problem, but in general programs only read the catalog when they are first run and stick with it. You'll find other commodities behave the same way...
User avatar
Daedalus
 
Posts: 42
Joined: Sat Jun 18, 2011 1:30 am
Location: From Ireland, living in Glasgow

Re: Locale change and pop up menu

Postby nbache » Sat Nov 07, 2015 12:31 am

ContextMenus is a bit special, because its menus are defined in a config file (residing in ENV[ARC]:). Naturally this file is in one language (English).

But since that config file is user-modifiable, it is not possible to have fixed, pre-translated catalog files with translations of the contents of the config file.

So the localization works in a different way.

The menu items which are directly calling Workbench menu items, also use their translations from workbench.catalog. The rest are untranslated, unless the file contextmenus.translation exists in your catalogs drawer for your language.

How to translate your custom menu items using that file is described in the ContextMenus.guide which you can find in Documentation/Commodities on your FE system partition.

For some languages (e.g. German), FE comes with a ContextMenus.translation file which translates those predefined items which are not automatically translated through WB's catalog.

Best regards,

Niels
User avatar
nbache
Beta Tester
Beta Tester
 
Posts: 1226
Joined: Mon Dec 20, 2010 8:25 pm
Location: Copenhagen, Denmark


Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 2 guests