Multilingual UI

kee nethery kee at kagi.com
Sun Jan 18 00:07:31 EST 2015


> On Jan 17, 2015, at 1:54 PM, Ethan Lish <ethanlish at gmail.com> wrote:
> 
> Is there a defined approach, tool or general guidance on how best to design & develop a livecode app to support a multilingual user interface. 

My approach was, for each text element (button, field), to create a custom property named for the language “en”, “fr”, “de”, and then put the translations into the custom properties. On opencard I would send a “loadlanguage" command (that I wrote, you can call yours whatever) to each element and populated the element with the appropriate translation. In the corner of each window I had a language selector and if the language was changed, I’d send opencard which would send loadlanguage to each element.

If the language custom property was missing for that language, and there was a “en” custom property, I’d use that. Also, if there was an “en” property, I’d create the other properties and populate them with the english translation. If there was no “en” custom property, I’d not alter what was being displayed by the element.

I found it useful to create a command that set the language to “ww” and then for each card, I’d measure the length of each translation and insert the longest translation regardless of language. I could then adjust the buttons and fields appropriately knowing they would work properly regardless which language was selected.

That is what I came up with when I was playing with a multi-lingual Livecode project. Seemed to work pretty well.

Kee Nethery






More information about the use-livecode mailing list