Create application that uses more than one languages.

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Create application that uses more than one languages.

Postby nirajpendal » Wed Dec 10, 2008 1:02 pm

Hi,

I know java very well. but I'm totaly new on this android platform.

I am developing one application, its a normal GUI based application.

But i want this application which supports more than one language.

For that i don't know anything what to do.

Other approach:
I can create application for English(US). so after developing whole application, can I migrate that application in other language?

Which approach will be suitable for me.
1) Should i create application in one language and then customize them into other language.
2) do something at the time of developing application. to make it compatible in more than one language

Please help me.. :cry:
Which approach will be suitable for me,
Please provide some useful links and code so that i can quick start my application.

Thanks in Advanced.
Thanks and regards,
Niraj Pendal.
nirajpendal
Freshman
Freshman
 
Posts: 4
Joined: Fri Nov 14, 2008 8:28 am

Top

Postby MrSnowflake » Wed Dec 10, 2008 2:13 pm

You should put all your strings in the values/strings.xml that way you can easily translate applications to different languages.

By making a directory called values-fr/ with a file strings.xml, you will have support for the french language, that simple. Though at the moment, I don't think you can actually select these languages, but with the new release in january this should work!

Maybe you could try to change your locale and hope Android loads the language file according. Or maybe getText() has localized alternative.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby Emmanuel7 » Fri Dec 12, 2008 2:40 am

Note that all of the resource files can be made language dependant. So you can also have a layout-fr directory, if you need to change your layout for a particular language( for instance, if some words can't fit in some buttons )
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby nirajpendal » Fri Dec 12, 2008 6:42 am

Thank you guys.. thanks for your help.

I got a good hint to start my work.

I will try to solve my problem with these help and update you soon.
Thanks and regards,
Niraj Pendal.
nirajpendal
Freshman
Freshman
 
Posts: 4
Joined: Fri Nov 14, 2008 8:28 am

Postby nirajpendal » Mon Dec 15, 2008 8:26 am

While digging further I got this useful location which can help people to give multi-language support.

http://code.google.com/android/devel/re ... eResources

Right now i m not able to test my application. is it anyway to change language of emulator?
Thanks and regards,
Niraj Pendal.
nirajpendal
Freshman
Freshman
 
Posts: 4
Joined: Fri Nov 14, 2008 8:28 am

Postby mad_coder » Mon Dec 15, 2008 8:38 am

I hope that the new release will not depend entirely upon the users location. It has been the source of occasional frustration from apps on other systems that use location to determine the language to display.

I can't read Thai very well, but I live in Thailand. I need English to use almost any application. It would be nice if there is an option up front (on initial use of the app) to choose English or the current locations language, if the location is not in an English speaking country.

There are many English-speakers that live in foreign countries. Situations where the language can't be changed will prevent someone from using, and therefore buying, an app.
mad_coder
Freshman
Freshman
 
Posts: 8
Joined: Mon Dec 15, 2008 8:28 am
Location: Bangkok, Thailand

Top

Postby MrSnowflake » Mon Dec 15, 2008 1:16 pm

nirajpendal wrote:Right now i m not able to test my application. is it anyway to change language of emulator?
I don't know, the release source Android build for the emulator did have some language selection. Yet keep in mind, at the moment it's not supported by Google. I suppose i18n support will follow in Januari, following the German and Dutch (and others) release of Android. Yet the emulator doesn't seem to support it (I have the R2 here).

mad_coder wrote:I can't read Thai very well, but I live in Thailand. I need English to use almost any application. It would be nice if there is an option up front (on initial use of the app) to choose English or the current locations language, if the location is not in an English speaking country.
It seems logical for the G1 to select automatically the language of the country you live in, otherwise everyone will always have to choose which language they want, other than English. But in the G1 rom for the emulator you can select your language manually... But indeed, location only language selection would be real bad.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Postby MrSnowflake » Mon Jan 12, 2009 2:13 am

It seems there is a way to change the language of the emulator (not G1!). Take a look in the draft docs for l10n.
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 3 guests