Internationalisation
Jos=?ISO-8859-1?B?6SBMLiBSb2Ry7Q==?=guez Illera
jlrodrig at ariadna.d5.ub.es
Sun Jan 5 20:42:01 EST 2003
Hi Igor,
I use another approach for getting the same results. All interface language
translations are stored in a field, each row a message or a label, and each
column a different language. This is easy to export or paste into a
spreadsheet, easy then for translators and easy to put back into the field.
Language to be used for the interface (not for contents: this will require a
different approach) is in a global, say "lengua". The following function
retreives the correct translated string:
function idioma what
global lengua
set itemdel to tab
return item lengua+1 of line what of fld "translations" of stack "language"
end idioma
---I need (lengua+1), since the first column is a number just for order
---Stack "language" is a substack of your mainstack
Then all you need is to call the function, usually in a preopencard handler:
set the label of btn 1 to idioma(27)
---where,say, line 27 of fld "translations" is the label for btn 1
set the label of btn 3 to idioma(29)
or
put idioma(12) into xx
answer xx
etc
This works well in an application with five languages, letting the user
change the language interface on the fly.
If you need an example, I may send you a stack.
Regards,
José L. Rodríguez
El 4/1/2003 18:02, Igor escribió:
>
(...)
>
> 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?
>
(...)
>
> Or have people found other ways/approaches to internationalising their
> apps?
More information about the use-livecode
mailing list