guillefix
guillefix

Reputation: 992

How do I set the default language of an Android App? (Appcelerator)

I'm currently developing an Android app with Appcelerator which is only in Spanish.

My problem is that if the user doesn't have its smartphone in Spanish, strings from strings.xml won't show:

strings.xml missing

How do I set Spanish as the default language of my app? I found a solution on the Appcelerator wiki, but it's just for iOS https://wiki.appcelerator.org/display/guides2/Internationalization#Internationalization-Setdefaultlanguage

Upvotes: 0

Views: 582

Answers (2)

Rene Pot
Rene Pot

Reputation: 24815

English is the default translation for all Titanium apps, therefore the English files are mandatory. If you just add the English folder to your i18n directory (inside the app directory) you should be good.

If your app is only going to be in Spanish, just add Spanish to that directory and everything should work everywhere.

There is a ticket in the Appcelerator JIRA for adding support, there is also a way to override in the comments: https://jira.appcelerator.org/browse/TIMOB-20527

Upvotes: 1

Aman
Aman

Reputation: 147

I would suggest, adding a translation in another language. Simply go to Strings.xml and there on top right, you will find an option which says - "Open Editor". In editor, just type your translation of strings in another language(maybe English). This will make your app in both English and Spanish.

Upvotes: 0

Related Questions