View Full Version : Language feature
sarah_77
20 Dec 2011, 12:18 AM
Hi! I've an app that needs to works in 3 languages (now) and other languages in futures..... what do you suggest me for manage languages in Sencha Touch 2 + PhoneGap?
Thanks
mitchellsimoens
20 Dec 2011, 3:52 AM
There are two ways to really do localization...
In Ext JS 4, we go the override route where you set a property for the text and then you use Ext.override to override that text into the language you load. I personally don't like this and if the class isn't present at the time of that locale file loading then you miss out on the localization.
I go the route of having a manager of sorts... I create a singleton and have the locale loaded via Ajax or <script> tag and save it to a property of the manager class. I then have a get method that will return the text for the key you pass. This is what I made for Ext JS 4 but haven't tried it with ST2: https://github.com/mitchellsimoens/Ext.LocaleManager
sarah_77
21 Dec 2011, 12:04 PM
Thanks for your reply! So isn't there a good solution for manage language.
mitchellsimoens
21 Dec 2011, 2:00 PM
Thanks for your reply! So isn't there a good solution for manage language.
Not built in
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.