harrypottar
8 Apr 2012, 5:24 AM
I know there as been a lot of threads on localization and MVC I read and read them but can not get it to work.
I thought this would be very simple?
All I would like to do is localize the standard components, we have a pre-existing model of xml localization for our on labels custom components I ported over form Flex.
I have tried this in my index page
The app loads but the standard components (eg, date) is still english.
<link rel="stylesheet" type="text/css" href="/extjs4/resources/css/ext-all-gray.css">
<script type="text/javascript" src="/extjs4/ext.js"></script>
<link rel="stylesheet" type="text/css" href="resources/css/basketassetscss.css">
<link rel="stylesheet" type="text/css" href="resources/css/BoxSelect.css">
<script type="text/javascript" src="/extjs4/locale/ext-lang-nl.js">
<script type="text/javascript" src="app.js"></script>
If I place the ext-lang call after than app call is fails to load the app with Ext.grid is undefined.
<link rel="stylesheet" type="text/css" href="/extjs4/resources/css/ext-all-gray.css">
<script type="text/javascript" src="/extjs4/ext.js"></script>
<link rel="stylesheet" type="text/css" href="resources/css/basketassetscss.css">
<link rel="stylesheet" type="text/css" href="resources/css/BoxSelect.css">
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="/extjs4/locale/ext-lang-nl.js">
I then tried to load the lang files via ajax. in the app.js
launch: function() {
Ext.Ajax.request({
url: '/extjs4/locale/ext-lang-nl.js',
success: function (response, opts) {
eval(response.responseText);
console.log("Loaded lang:", this.url );
},
failure: function () {
console.log("Failed to load requested lang:", this.url );
},
scope: this
}),
}
This time the app loads, I do not get localized components and still get the console error Ext.grid undefined.
Please help just want to load static localization.
Thanks
Harry
I thought this would be very simple?
All I would like to do is localize the standard components, we have a pre-existing model of xml localization for our on labels custom components I ported over form Flex.
I have tried this in my index page
The app loads but the standard components (eg, date) is still english.
<link rel="stylesheet" type="text/css" href="/extjs4/resources/css/ext-all-gray.css">
<script type="text/javascript" src="/extjs4/ext.js"></script>
<link rel="stylesheet" type="text/css" href="resources/css/basketassetscss.css">
<link rel="stylesheet" type="text/css" href="resources/css/BoxSelect.css">
<script type="text/javascript" src="/extjs4/locale/ext-lang-nl.js">
<script type="text/javascript" src="app.js"></script>
If I place the ext-lang call after than app call is fails to load the app with Ext.grid is undefined.
<link rel="stylesheet" type="text/css" href="/extjs4/resources/css/ext-all-gray.css">
<script type="text/javascript" src="/extjs4/ext.js"></script>
<link rel="stylesheet" type="text/css" href="resources/css/basketassetscss.css">
<link rel="stylesheet" type="text/css" href="resources/css/BoxSelect.css">
<script type="text/javascript" src="app.js"></script>
<script type="text/javascript" src="/extjs4/locale/ext-lang-nl.js">
I then tried to load the lang files via ajax. in the app.js
launch: function() {
Ext.Ajax.request({
url: '/extjs4/locale/ext-lang-nl.js',
success: function (response, opts) {
eval(response.responseText);
console.log("Loaded lang:", this.url );
},
failure: function () {
console.log("Failed to load requested lang:", this.url );
},
scope: this
}),
}
This time the app loads, I do not get localized components and still get the console error Ext.grid undefined.
Please help just want to load static localization.
Thanks
Harry