Results 1 to 4 of 4

Thread: Language feature

  1. #1
    Sencha User
    Join Date
    Mar 2011
    Posts
    81
    Vote Rating
    0
      0  

    Default Language feature

    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

  2. #2
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Vote Rating
    1391
      0  

    Default

    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
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Mar 2011
    Posts
    81
    Vote Rating
    0
      0  

    Default

    Thanks for your reply! So isn't there a good solution for manage language.

  4. #4
    Sencha User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,062
    Vote Rating
    1391
      0  

    Default

    Quote Originally Posted by sarah_77 View Post
    Thanks for your reply! So isn't there a good solution for manage language.
    Not built in
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    ________________
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:
    https://github.com/mitchellsimoens

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •