Localizing menus

GIRARD Damien dam-pro.girard at laposte.net
Mon Jan 28 12:56:44 EST 2008


Bonjour Eric,

You are right, Menuhistory is not perfect, but if you have a simple 
static menu (99% of my menus are static), this is the best way.
After, if you want to have an advanced menu, (eg: with sub menu), 
menuhistory is not made for that, but lineoffset or a custom repeat are 
better.

About localization, I am used to create software fully localized, by 
using my localization library and it's IDE.
You will get more information about it from Runrev in few weeks.

Regards,
Damien

Eric Chatonet a écrit :
> Bonjour Damien,
>
> MenuHistory seems, at first sight the straight way but, actually, it 
> is 'hardcoded' as would be 'Cut' or 'Paste':
> This means that you can't modify your menus, inverting two menu items 
> or adding a new one, for instance without modifying your code.
> It's the reason why I suggested the lineoffset approach:  the code 
> will adjust itself to any modification :-)
>
> To be more precise, I am used to keep not only menus but hundreds of 
> strings in several Roman languages to set an interface.
> I keep them in a ciphered external file (actually a simple tab tab 
> return table, the first column of which is an ID) and load into a 
> global this first column and the column that corresponds to the chosen 
> language.
> Then a function can return easily the right string in the right 
> language according to an ID reference.
>
> Le 28 janv. 08 à 18:18, GIRARD Damien a écrit :
>
>> Mark Smith a écrit :
>>> I've got this little freeware app for backing up files from an iPod, 
>>> and one of my french users has asked about localizing it.
>>> I've read through the past threads on the list, and I've got a 
>>> decent custom property scheme working for all the bits and pieces in 
>>> the UI.
>>> However, I'm wondering about the menus - this is on OS X.
>>>
>>> Take the 'Edit' menu. Setting the label of btn "Edit" to "Édition" 
>>> (extracted from my cp set) at start up is no problem, but then I 
>>> need to replace the menuItems "Cut, Copy, Paste" with their 
>>> localized counterparts, and also respond to the menuPick messages 
>>> for each. This seems quote complicated. Has anyone some advice they 
>>> can give me?
>>>
>>> Also, if anyone has the time, ability and inclination to help with 
>>> translating the 20 words and phrases used into any other languages 
>>> that would be amazing.
>>>
>>> Thanks,
>>>
>>> Mark_______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your 
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>>
>> Hello Mark,
>>
>> In order to translate a menu, you have to work with "menuhistory".
>> This function will return to you the position in the menu of the 
>> entry selected.
>>
>> This is the script that I ever use in my translated menu.
>>
>> on menupick
>> switch (the menuhistory of me)
>> case 1
>> -- script of the first menu entry.
>> break
>> case 2
>> -- script for the second menu entry
>> break
>> end switch
>> end menupick
>>
>> Note: About the menuhistory, line delimiter are considered like menu 
>> item.
>> Example:
>> Cut      --> 1
>> Copy   --> 2
>> Paste   --> 3
>> (-         --> 4
>> Preference --> 5
>>
>> --------------------
>>
>> I am French, I can try to translate you some sentence from English to 
>> French.
>>
>> Regards,
>>
>> GIRARD Damien
>> Dam-pro
>> www.dam-pro.com
>
>
> Best regards from Paris,
> Eric Chatonet.
> ----------------------------------------------------------------
> Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
> Email: eric.chatonet at sosmartsoftware.com/
> ----------------------------------------------------------------
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>




More information about the use-livecode mailing list