Locale change and pop up menu

This forum is for general developer support questions.
Post Reply
User avatar
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

Locale change and pop up menu

Post by mritter0 »

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
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Locale change and pop up menu

Post by nbache »

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
mritter0
Posts: 214
Joined: Mon Aug 25, 2014 9:41 pm
Location: Bettendorf, IA, USA

Re: Locale change and pop up menu

Post by mritter0 »

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 ... =36&t=3234 they might update.... ;)
Workbench Explorer - A better way to browse drawers
User avatar
Daedalus
Posts: 42
Joined: Sat Jun 18, 2011 12:30 am
Location: From Ireland, living in Glasgow
Contact:

Re: Locale change and pop up menu

Post by Daedalus »

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
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: Locale change and pop up menu

Post by nbache »

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
Post Reply