Internationalize an app?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
ju11
Posts: 5
Joined: Fri Aug 10, 2012 10:55 pm

Internationalize an app?

Post by ju11 » Sat Aug 11, 2012 5:39 pm

Hi,

What is the proper way to internationalize an app for iphone/ipad?

Thank you for your help

ju11
Posts: 5
Joined: Fri Aug 10, 2012 10:55 pm

Re: Internationalize an app?

Post by ju11 » Mon Aug 13, 2012 8:47 pm

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 :-)

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Internationalize an app?

Post by jacque » Tue Aug 14, 2012 5:17 am

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Internationalize an app?

Post by Klaus » Tue Aug 14, 2012 9:28 am

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

dave_probertGA6e24
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 328
Joined: Mon Dec 05, 2011 5:34 pm
Contact:

Re: Internationalize an app?

Post by dave_probertGA6e24 » Tue Aug 14, 2012 9:57 am

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
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Internationalize an app?

Post by bangkok » Tue Aug 14, 2012 2:18 pm

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)

genie
Posts: 108
Joined: Thu Dec 01, 2011 7:19 am

Re: Internationalize an app?

Post by genie » Wed Nov 07, 2012 7:14 am

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?

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Internationalize an app?

Post by Klaus » Wed Nov 07, 2012 11:51 am

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

genie
Posts: 108
Joined: Thu Dec 01, 2011 7:19 am

Re: Internationalize an app?

Post by genie » Thu Nov 08, 2012 3:07 am

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. :)

Post Reply