-
2 Dec 2011 6:15 AM #1
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 Dec 2011 8:31 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
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
________________
http://www.JSONPLint.com - Source to lint your JSONP!
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 almost in print!
When posting code, please use BBCode's CODE tags.
-
3 Dec 2011 3:21 AM #3
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.The label is well translated but the DatePicker?Code:{ xtype: 'DateField' fieldLabel: lm.get ('fields.dateofbirth') ', name: 'dob' allowBlank: false }
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


Reply With Quote