Page 1 of 1
Multi language application
Posted: Wed Aug 29, 2012 8:57 pm
by vince
I'm currently evaluating Livecode and i can't seem to find a lot of information on how one would create a multi-language application where the complete user interface is available in multiple languages. Is this possible with Livecode and if so how? Is it possible to have end users provide extra translations in an easy way?
To me this seems like an obvious functionality of a modern programming language, so i'm hoping i have just missed the information about it in the documentation

Re: Multi language application
Posted: Wed Aug 29, 2012 9:36 pm
by FourthWorld
Most objects in LiveCode have a label property which is independent of the object's name, allowing you to write code to take advantage of the mnemonic value of the name while dynamically changing the label, such as for multiple languages.
Menu items support a tag element which allows you to have a single consistent argument sent to the menuPick handler regardless of what the actual menu item label shows, which is also particularly useful for multilingual support.
So while there's no built-in automated support for localization per se, the necessary elements for making localized apps are available and not difficult to work with.
Re: Multi language application
Posted: Wed Aug 29, 2012 10:02 pm
by vince
thanks Richard for your prompt reply!
I find it strange that runrev hasn't supplied a demonstration project or documentation to demonstrate how this should happen (that i could find). I understand that it is at least possible from your answer which is good to know. But i still don't feel really comfortable about making a multi language app (win + mac) and would have expected more on this subject from runrev.
Re: Multi language application
Posted: Wed Aug 29, 2012 10:18 pm
by mwieder
I don't know of any "modern programming language" that supports i18n natively. LiveCode's support is essentially the same as java's, and can be easy to implement, even if it's not built in.
1. create resources for the i18n strings
Code: Select all
set the uLocalization["English"]["warning"] of this stack to "Warning"
set the uLocalization["Espanol"]["warning"] of this stack to "Peligro"
2. utilize switch statements to change locales or create a function to do the work
Code: Select all
function localize pLanguage, pString
return the uLocalization[pLanguage][pString] of this stack
end localize
Re: Multi language application
Posted: Thu Aug 30, 2012 8:17 pm
by vince
Well for example for Qt there's Qt Linguist (Google it as i can't post links yet).
But anyway, reading from your experiences i understand that multi language applications are perfectly doable in LC so that's enough assurance for now. It would just be nice if runrev themselves would offer more possibilities and documentation. Also when developing for mobile devices you see a lot of multi language apps so the need for this is only getting bigger.
Re: Multi language application
Posted: Thu Aug 30, 2012 9:05 pm
by mwieder
Thanks for the er... link. I wasn't aware of that one.
Qt, of course, is an application framework rather than a "programming language", coding is done in C++, but it's nice that they've bundled the translator into the framework.
Setting it up to use (
http://doc.trolltech.com/4.0/linguist-programmers.html) looks about the same in Qt as it does anywhere else:
load the translator framework
instantiate a translator object
load the locale strings
use the strings
It's much the same in LiveCode or anything else, you just have to do a bit more because there's no standard translator module built in for you. My hope was that LiveCode's profiles would work this way, but they don't.