dam-pro.girard at laposte.net
Wed Jul 11 07:16:19 EDT 2007
Eric Chatonet a écrit :
> Hi Mark,
> Le 10 juil. 07 à 20:27, Mark Talluto a écrit :
>> I need to localize one of my apps for different languages. I remember
>> talking with Trevor about this at a SoCalRev Meeting a while back. I
>> just don't remember the details.
>> How are you guys handling multi-lang versions of your software? I
>> remember him storing it in a custom property. The key was the
>> technique for changing out the text for all the controls in a stack
>> on the fly. Any pointers would be appreciated.
>> Mark Talluto
>> CANELA Software
> We are are finishing (public beta) an app in six Roman languages that
> uses more than one thousand strings for each language (labels,
> prompts, contents, etc.).
> Each language is stored into an external file with lines in the form
> of <ID><tab><string>
> As Ken pointed this out, it's important to store languages strings in
> an external file (you will open it in Excel as a tab/tab/return text
> file) for easy maintenance and translation.
> Within the app, the file corresponding to a language is stored into a
> global and the following function is used to get strings:
> function GetLanguageString pID
> global gPrefs, gLanguage
> local tStr
> set the itemDel to tab
> put item 2 of line lineOffset(pID,gLanguage) of gLanguage into tStr
> replace "|" with cr in tStr -- cr are put back
> return tStr
> end GetLanguageString
> And for instance:
> on SetGUILanguage
> local tID
> repeat for each item tID in
> put GetLanguageString(tID) into fld ID tID
> end repeat
> Such a method is very fast: changing one hundred labels or fields
> contents (screen locked of course) appears instant for the user.
> Strings may include tags (<tag>) that can be replaced on the fly with
> correct values if needed.
> Here is an example we use for tooltips:
> if "<tag>" is in tTooltip then replace "<tag>" with the uTag of the
> target in tTooltip
> -- and the uTag of the target is set at mouseEnter
> About string lengths according to languages (French, German, Spanish,
> etc.), consider that you will not have problems if allowed width in
> your GUI is 30% more than the width needed for English.
> Of course I can't detail here all tricks that make life easy with
> multilingual apps :-)
> Feel free to contact me off list.
> Best regards from Paris,
> Eric Chatonet.
> Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
> Email: eric.chatonet at sosmartsoftware.com/
I am currently finishing my set of software that will solve all your
I have written a library that is in test phase, this library permit to
localize entirely, quickly an entire runrev app.
This library permits also to manage the entire geometry of a runrev app.
Used both, these two components of my library permit to have the best
portable applications, your software will have
the best looking GUI for each language, and each operating system.
This means that each object that contains a text will be resized to fit
to his text. You can set minimal/maximal width/height for the object.
You can prevent also it to be resized. This work also with icons.
This library is powered by the Revolution XML engine, for a fast data
This library is a bit hard to use only in command line, so I have
written a GUI that permit to manage easily and quickly everything.
This GUI is near the beta phase.
I am currently writing the software that will permit to the translator
to translate the software in the language that he wants.
This software is using my library, and I am using also my GUI for manage
my library, and I am making this software faster than before
because I can forget all the localization things. When I add a new
object in my stack, I have got just two clicks to done, one for adding it
in the localization database and another click for add it in the
geometry manager database.
After if I want to have this object to be resized in my software, I done
3 clicks, I have got a geometry manager wizard that permit to me to add
geometry relations without any problems, and brain problems. The wizard
work like that: I want to set the left of this object, from the left of
this <a selected object> and I want to add 3 pixels. Really easy to use.
I have tried my software under Windows XP and Windows Vista, Windows
Vista doesn’t have the same font size compared to Windows XP, so,
without my library, I have to reset all object size… With my library, I
started the software under Windows Vista; it got the good Vista look and
feel without doing anything.
My set of software is the result of hard works; I hope that it will be
finished before August.
(Sorry if I have done some English fault, never I went in an English
More information about the Use-livecode