1. #1
    Sencha User
    Join Date
    Apr 2008
    Location
    Buenos Aires, Argentina
    Posts
    67
    Vote Rating
    1
    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
    67
    Vote Rating
    1
    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
    67
    Vote Rating
    1
    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.

  8. #8
    Sencha User
    Join Date
    Aug 2011
    Location
    Belgium
    Posts
    44
    Vote Rating
    1
    jcoenrae is on a distinguished road

      0  

    Default


    Hello,

    I'm struggling for a week now on internationalizing my application. I tried above hints and tips, but my situation is each time slightly different so it's difficult to find the correct solution.

    I'm creating an application with Phonegap, so I can not make use of server things. Everything needs to be in Javascript.

    I tried the Ext way of doing i18n, but the problem is that I can't find how to refresh the page so that it is using the new values. Should I destroy everything and load it again? In the beginning all my panels were created with ... = new ..., but I already changed that to classes to call the initComponent method. Creating all the panels again is a lot of work because I have a lot of panels.

    I also tried it with a seperate object in which the strings are, but again, the strings are refreshed in this object but I can't find out how to refresh them in the panels.

    Thanks already for your hints and tips. it already helped me a lot.

    Jolien

  9. #9
    Sencha User
    Join Date
    Aug 2011
    Location
    Belgium
    Posts
    44
    Vote Rating
    1
    jcoenrae is on a distinguished road

      0  

    Default


    Hi again,

    I just tried to call the initComponent methods, and that is changing the values but it still doesn't refresh the rendered html. is there some kind of render method you can call manually?

  10. #10
    Sencha User
    Join Date
    Aug 2011
    Location
    Belgium
    Posts
    44
    Vote Rating
    1
    jcoenrae is on a distinguished road

      0  

    Default


    Hi,

    I got it working by destroying my viewport and creating it again. This loads all the panels again with the correct language and renders them again. It happens without flickering for the user.

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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."