Page 1 of 1
Internationalize an app?
Posted: Sat Aug 11, 2012 5:39 pm
by ju11
Hi,
What is the proper way to internationalize an app for iphone/ipad?
Thank you for your help
Re: Internationalize an app?
Posted: Mon Aug 13, 2012 8:47 pm
by ju11
No answer... I guess that this is because it is not possible (yet).
Therefore, two other questions:
- is it a planned feature?
- On the apple store, is it possible to put the same application in different languages separately?
I guess the answer is no, but I would be interested if someone has identified a way to circumvent this lack of Livecode (which is definetely a very good software... I am a beginner, and in 3 days I almost finished my first application!).
Sorry for my bad english

Re: Internationalize an app?
Posted: Tue Aug 14, 2012 5:17 am
by jacque
It's possible. The answer is a bit involved, so maybe no one had time to explain it. Basically you'll want to set up different custom property sets, one for each language. When the app opens you need to find the user language (ask when you get that far) and go through all the objects and menus, setting up their names and other properties based on the correct language set. LiveCode provides "profiles" which are intended to make some of this job easier; you can read about them in the User Guide.
When you've got that working, you'll need to add language project folders to the app bundle if you're on a Mac. That's for later.
Re: Internationalize an app?
Posted: Tue Aug 14, 2012 9:28 am
by Klaus
Hi ju11,
I have a little stack with showing the "custom property set" solution.
Go to my page and scroll a little down to "CP-Sets1":
http://www.major-k.de/xtalk.html
That may get you started.
Best
Klaus
Re: Internationalize an app?
Posted: Tue Aug 14, 2012 9:57 am
by dave_probertGA6e24
Hi,
For an App I'm working on I simply have a function which gets the users choice of language from a option list in the program, a function to load a language file (basic text file with one line per translatable entry... e.g.. wobble_label;The text of Wobble Label goes here) and then a function on each card to replace all the specified text fields (and text in button, etc) on openCard - if the language has changed since last view of the card.
It's actually quite a simple process for the most part, but I'm only working with basic Latin characters (English, Spanish, French, German, Russian, etc) - no Asian (Thai, Japanese, Chinese, etc) or other strange character sets.
There are a couple of little bits where buttons are a little wide with certain words and should really be shortened for certain languages, but that is likely to happen a little later.
Of course with a lot of cards and a lot of text this approach would be tiresome and could be improved/automated quite a bit. At the level I'm working at though it does the job well.
Cheers,
Dave
Re: Internationalize an app?
Posted: Tue Aug 14, 2012 2:18 pm
by bangkok
dave_probertGA6e24 wrote:no Asian (Thai, Japanese, Chinese, etc) or other strange character sets.
For "strange character sets" :
http://livecode.byu.edu/unicode/unicodeInRev.php
(how to store the label of a button... in chinese for instance)
Re: Internationalize an app?
Posted: Wed Nov 07, 2012 7:14 am
by genie
I also have an app that should be a available in several languages (English, Spanish, French).
What I did is, I used a database from where I would query texts for that particular language. So if the user picks French, texts on the app will be automatically replaced by what I have in "French" column in database.
My problem is, some French/Spanish characters would appear weird on my app.

When I browser my DB, characters look fine, but they look bad when displayed to DB
Any ideas?
Re: Internationalize an app?
Posted: Wed Nov 07, 2012 11:51 am
by Klaus
Hi genie,
sounds like the database is using a different character set (Mac or ISO or unicode or...) than you and your app exspect.
You need to take care of this and convert the data accordingly.
Example:
If your database uses ISO (Windows character set) and your app runs on a Mac then you need to:
...
put IsoToMac(the_data) into the_data
## or the other way round: MacToIso(the_data)
...
Before putting the data into fields in your app.
Best
Klaus
Re: Internationalize an app?
Posted: Thu Nov 08, 2012 3:07 am
by genie
Thanks Klaus!
I think my DB is in utf-8. Yesterday I used some...
Code: Select all
revExecuteSQL tDatabaseID, "SET NAMES 'utf8'"
..and it works, but not totally it seems. My Spanish texts look okay, but some of my French character still appears weird on the app.
I will try to play around your suggestion.
