1. #11
    Sencha User
    Join Date
    Sep 2011
    Posts
    43
    Vote Rating
    0
    bassjobsen is on a distinguished road

      0  

    Default


    Hello,

    I also try to internationalize my app. Maybe better build a multi-language app.
    So i look to the Ext.i18n.bundle.
    I liked it. It seems the seems kind of solution @Condor suggest in http://www.sencha.com/forum/showthre...ation-Settings but Ext.i18n.bundle also does the language detecting.

    The first problem i found. Ext.i18n.bundle loads b.e. Application_en-US.properties. I want to have one english translation for all english speaking users.
    Second when language detecting done this way, the user can never switch language. Unless he switch the language of his phone.

    Questions i have got. I build app with sencha and phonegap. Does the language detecting works in these app? Cause it's called browser language in Ext.i18n.bundle.
    I also found: http://www.sencha.com/forum/archive/.../t-111833.html
    Phonegap also offers a solution: https://github.com/phonegap/phonegap...obalization.js
    And what about using only navigator.language directly?

    I also have to find a solution for the datepicker. How can Ext.i18n.bundle help here? I also found http://stackoverflow.com/questions/7...ch-i18n-basics which looks complex to me.

    I think i need to offer my users the possibilty to switch language. I was thinking to link this function to the menu-button of the phone. Maybe an popup like the datepicker when pressing this button. This setting should be safed, so i need a solution for that too. Does someone has a better solution for this? Or maybe an example for such a setting menu function?

    Thanks and best regards,

    Bass

  2. #12
    Sencha Premium Member
    Join Date
    Jun 2011
    Location
    Nottingham, UK
    Posts
    24
    Vote Rating
    0
    mysterydiner is on a distinguished road

      0  

    Cool I git this working for sencha touch version 2 pr3

    I git this working for sencha touch version 2 pr3


    To help other internationally minded souls - I've posted my hack of Elmasse's Ext.i18n library (see (http://elmasse.gaver.nl/index.php/bl...-touch-bundles for original).
    Apologies for any rough code - I just hacked it till it works and haven't code reviewed it.
    Attached Files

  3. #13
    Sencha Premium Member
    Join Date
    Jun 2011
    Location
    Nottingham, UK
    Posts
    24
    Vote Rating
    0
    mysterydiner is on a distinguished road

      0  

    Lightbulb Offline

    Offline


    Oh and if you want to get this to work offline - make sure to set the proxy param - noCache:false (and include resources in your cache manifest file of course)

  4. #14
    Ext JS Premium Member
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    k.pavithra is on a distinguished road

      0  

    Default


    To make localization resources available before the application creates the view, the following code worked for me.

    Code:
    Code:
    buttonPath =pageContext.path+"/button/";
    buttonBundle = new Ext.i18n.Bundle({bundle:'ButtonResources', path:buttonPath, lang: pageContext.locale});
        buttonBundle.onReady(function(){
            Ext.application({
                name: 'FirstApp',
                appFolder: '/sample/js/extJS/FirstApp/',
                autoCreateViewport: true,
                controllers: ['FirstAppController'],
                launch: function() {
                }
            });
        });

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

      0  

    Default Bundle for ST2 and an experimental case

    Bundle for ST2 and an experimental case


    Guys,

    Thank you all for the feedback on this component. I will be working on some issues mentioned here (like loading language non-country specific bundles, offline, and so on)

    What I wanted to announce today is that I have already uploaded a new version for Sencha Touch 2 ( Ext.18n.Bundle v0.3) you can check it out at
    https://github.com/elmasse/Ext.i18n.Bundle-touch

    Also, and as an experimental branch, you can find a different approach for bundles using css-content. The goodness of this approach is that you don't need to reload nor refresh your application. When you change your language it just works.

    Take a look at: https://github.com/elmasse/Ext.i18n....ee/css-content

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