1. #1
    Sencha User
    Join Date
    Feb 2008
    Posts
    99
    Vote Rating
    0
    sekaijin is on a distinguished road

      0  

    Default Unanswered: howto localize MVC application.

    Unanswered: howto localize MVC application.


    HI
    How to translate an MVC application?

    I tried to download the file "ext-lang-fr.js" after "ext-debug.js"
    But an exception is thrown because Ext.view is not defined.
    in effent Ext.Loader support component after.

    I tried on onReady but again fails the assessment for the same reason.

    I tried the method "launch" of the application without success

    The problem is that if I support the local after the launch of my application, the "view" components are defined, but the view is created in English.
    If I load the local before the launch of the application view is not yet defined but component not

    how to load the components in the language of the user.

    I tried to use ext-all-debug instead of ext-debug since all components are well defined before loading the local and launch the application.
    but then MVC does not work.

    A + JYT

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,404
    Answers
    3549
    Vote Rating
    849
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The way that the locale files do it is just an override. There usually are if statements to check to make sure the class is present and then it will execute an override. Not my favorite way of locale so I created a simplistic means of it: https://github.com/mitchellsimoens/Ext.LocaleManager
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2008
    Posts
    99
    Vote Rating
    0
    sekaijin is on a distinguished road

      0  

    Default


    Hello and thank you.

    I just have a look at "Ext.LocaleManager" but I'm not sure that answers my question.

    I'll take a closer look. My problem is not locating my components but those of "Ext.core"

    such as how to schedule a "DatePicker" either in the language of the user.

    For this purpose in view I add a DateField
    Ext.Loader support the DateField component but it is in English.
    Code:
    {
                         xtype: 'DateField'
                         fieldLabel: lm.get ('fields.dateofbirth') ',
                         name: 'dob'
                         allowBlank: false
                     }
    The label is well translated but the DatePicker?
    This would require that the local file to be loaded outside of Ext I can not commprendre how.
    ExtJS locale file assumes that all ExtJS components are set out with the MVC pattern is not the case.


    I will study Ext.LocaleManager.
    A+JYT
    PS: sorry for my approximative english

Thread Participants: 1