Internationalisation

livfoss at blueyonder.co.uk livfoss at blueyonder.co.uk
Sat Jan 4 11:03:01 EST 2003


On Sat, 4 Jan 2003 09:29:36 +1100 Igor Couto <igor at pixelmedia.com.au> wrote:
Dear Revolutionaries,

I've read the (rather clever and useful) recommendation that all text 
(string) that is to be displayed to a user, anywhere in the interface, 
should be kept on a separate text file, so that this file can be easily 
sent to translators. This not only makes the translator's job easier 
and faster (and cheaper), but also means they can translate without 
having to gain direct access to your stacks.

My question is: what is the procedure for 'loading' all the text ONTO 
the interface? How does one change all the text on menus, buttons, 
label fields, etc?

In the Revolution documentation, they mention the use of custom 
property sets as a way to 'store' internationalisation information - 
ie., you store all the different strings needed for a certain language 
in a custom property set for that language. At launch time, we would 
only have to 'load' the appropriate set.

Where I'm getting confused is with the 'normal' (ie, NOT custom) 
properties - ie, the names/labels of buttons, or text of label fields. 
What do we do with these? How can we change *these* as well when we 
change the property set?

Or have people found other ways/approaches to internationalising their 
apps?

All suggestions GREATLY appreciated!

Hi Igor

Apologies to all if this reply appears twice. I'm using a webmail service which is a bit unreliable.

I plan to do this with two parallel lists (i.e. two lists each with the same number of items). The first list will have all the texts I need for a specific language (probably read in from a text file). The second list will consist of commands, each one appropriate to the text in the corresponding position in the list. So for example a text that's got to end up in a field would have a command like:

put it into line 1 of field "foo" of card "bar" of stack "main"

and a text that goes into a button would have a command like

set the text of button "foo" of card "bar" of stack "main" to it.

The we just loop around executing the appropriate command for each text.

I'll tell you if it works when I've tested it! Meanwhile I'd very much like to see how others tackly this.

HTH

Graham
---------------------
Graham Samuel / The Living Fossil Co. / UK & France



More information about the use-livecode mailing list