Hybrid View

  1. #1
    Sencha User
    Join Date
    Apr 2008
    Location
    Buenos Aires, Argentina
    Posts
    66
    Vote Rating
    0
    elmasse is on a distinguished road

      0  

    Default Ext.i18n.Bundle Using Bundles now for Sencha Touch 1.0

    Ext.i18n.Bundle Using Bundles now for Sencha Touch 1.0


    Guys,

    Here you can find my solution for i18n using .properties files (ala Java) Hope you can find this useful!

    http://elmasse.gaver.nl/index.php/bl...-touch-bundles

    Regards!
    Max

  2. #2
    Touch Premium Member
    Join Date
    Oct 2009
    Location
    Minnesota
    Posts
    5
    Vote Rating
    0
    bcoffield is on a distinguished road

      0  

    Thumbs up


    This is an interesting approach. I do something similar in the post below, the difference being I use js objects to store values instead of properties files:

    http://www.sencha.com/forum/showthre...d-Localization

    Eventually I would like to get a response from the Sencha Touch crew to see if they have an officially sanctioned way to do I18N. An API from them would be awesome ... but I haven't heard anything about that.

  3. #3
    Sencha User interfasys's Avatar
    Join Date
    Mar 2011
    Location
    UK & Switzerland
    Posts
    125
    Vote Rating
    1
    interfasys is on a distinguished road

      0  

    Default


    It seems that link is private.
    I too would love for Sencha to offer an official path.
    Olivier - interfaSys
    Developing custom solutions for BlackBerry 10 using Sencha Touch.

  4. #4
    Sencha User
    Join Date
    Jul 2011
    Posts
    5
    Vote Rating
    0
    bundinho is on a distinguished road

      0  

    Default


    Quote Originally Posted by bcoffield View Post
    This is an interesting approach. I do something similar in the post below, the difference being I use js objects to store values instead of properties files:

    http://www.sencha.com/forum/showthre...d-Localization

    Eventually I would like to get a response from the Sencha Touch crew to see if they have an officially sanctioned way to do I18N. An API from them would be awesome ... but I haven't heard anything about that.
    Just can't have access to the thread

  5. #5
    Sencha User
    Join Date
    Apr 2008
    Location
    Buenos Aires, Argentina
    Posts
    66
    Vote Rating
    0
    elmasse is on a distinguished road

      0  

    Default


    AFAIK, Sencha or ExtJS has a way to do i18n by loading .js files that override variables used to represent text.
    This solution doesn't aim to replace that methodology but it comes to solve a common issue when you work with Java code in backend. At the time I started this component I was working with a lot of Java and I needed to re-use or integrate its i18n solution in order to not have multiple path to the same way.

    Despite of that, I believe that we need a better strategy for i18n but that is a different topic.

  6. #6
    Touch Premium Member
    Join Date
    Oct 2009
    Location
    Minnesota
    Posts
    5
    Vote Rating
    0
    bcoffield is on a distinguished road

      0  

    Default Link content

    Link content


    Here is the content from the above link that does not work for non-premium members.

    Hi,

    My app has content that is being localized, and I am curious if there is a suggested approach for an I18N implementation. I have an idea about what could be done, but would like to know if I'm doing it all wrong.

    Basically I need all the localized resources before the app is initialized, so they can be used as component configuration values. To do this, I do something like
    Code:
    Localization.onReady(startApp())
    To clarify, Localization is not an existing object. It is created in my code before my app is launched, and contains logic to get the correct strings based on browser locale. Then in the app I can do things like:

    Code:
    var myButton = new Ext.Button({
    text: Localization.getLocalizedString('mybuttonresourcekey')
    });
    I can use the global navigator object to detect browser locale and get the right strings that way, so no worries there.

    Is this the right approach? I'm mostly questioning the way I use the Localization.onReady before Ext.onReady to start the app. Thanks for any advice you can lend, or documentation you can point me to.

    Brien

  7. #7
    Sencha User
    Join Date
    Apr 2008
    Location
    Buenos Aires, Argentina
    Posts
    66
    Vote Rating
    0
    elmasse is on a distinguished road

      0  

    Default


    Brien,

    This is an oldie but it is how i18n is proposed from ExtJS devs point of view:
    http://www.sencha.com/learn/legacy/Tutorial:Localizing_Ext


    This is some kind of workaround. You can override your localized variables by js code. In this example, when you change or select a different language, a new .js file is loaded and its content will override your already defined variables.

Similar Threads

  1. i18n with Ext.js: Resource Bundles!
    By elmasse in forum Community Discussion
    Replies: 29
    Last Post: 25 Jan 2013, 2:21 PM
  2. Ext JS and Sencha Touch!
    By mcamer in forum Sencha Touch 1.x: Discussion
    Replies: 8
    Last Post: 1 Dec 2010, 10:19 AM
  3. Replies: 2
    Last Post: 26 Nov 2010, 9:58 AM

Thread Participants: 7

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar