Search code examples
appceleratorappcelerator-titanium

Titanium - change language programmatically


I want to change the language of the app inside it. I want to allow the user to change the language from settings.

Is it possible?? because I can't find a setLocale() method or something similar.

Thanks.


Solution

  • I'm afraid this isn't possible using the build in tools. The build in tools are used by Android and iOS specifically to change the language based on the OS settings.

    The way you can do this is by making it custom. Defining your own global function to get translations from (instead of the L() function). But this also requires you to put your translation files somewhere else.