-
17 Dec 2012 3:27 AM #1
Languages, having problems.
Languages, having problems.
Hello there!
I am having some issues with the setting of more languages. How can i do this ?
(Not asking for syntax, more asking for architektur)
1) index.html
combobox whit three languages:
var language= "en"; //i choose english
2) ApplicationLanguages.js
Ext.ns("ApplicationLanguages.lang");
myApp.lang.en{
title01: "Hello there",
key02: "value02"
};
myApp.lang.de{
title01: "Hallo wie gehts",
key02: value02
};
myApp.lang.es{
title01: "Como estas ?",
key02: value02
};
So this, works fine:
MyGrid = Grid {(
title: myApp.lang.en.title01,
...
)};
When i change this to spanish or german, it remains english so i changed it to this:
MyGrid = Grid {(
title: myApp.lang. + language + .title01,
...
)};
syntax error. so next change without dots and:
var language = ".en."
MyGrid = Grid {(
title: myApp.lang + language + title01,
...
)};
So here i dont get any syntax errors but it doesnt get dynamically what i want it to do. Of course is language a String and does not work getting the json class what i need. but i dont know how to do it.
Any help please ?
-
18 Dec 2012 10:12 AM #2
any help on this ?
i think it is ok to know about some search words, that i can be looking in google!
-
20 Dec 2012 6:45 PM #3
I wouldn't include all language strings in one file - since this means the user is downloading and populating numerous variables which will never be used (i.e. If English is selected, the German, Spanish, French, etc variables are never needed).
Instead, I would have a separate language string file for each language, which all contain the exact same variables - then simply load the correct version of this file depending on which language they have selected?
An example:
http://dev.sencha.com/deploy/ext-3.4...ulti-lang.html
-
4 Jan 2013 1:12 PM #4
You should try
PHP Code:title: myApp.lang[language].title01,
Extensions:
Ext.ux.DatePickerPlus (Multimonth,Multiselect,...)
Ext.ux.menu.StoreMenu - Ajax Store as menu-item config
Extended Window - Aero Shadows, nested grayscaled modal windows
Ext.MessageBox.promptCombo/promptRadio/promptCheckbox
Ext.ux.plugin.triggerfieldTooltip (for Comboboxes, Datefields...)
Ext.util.MD5
Ext.util.Utf8 (encode/decode)
Ext.util.base64 (encode/decode)
Using:
ExtJS 3.4.1.1/4.2
XPsp3/W7sp1
IE8/9/10
FF 20
Chrome 26


Reply With Quote