I'm trying to localize the Korzh component EasyQuery. I'm actually halfway as I managed to localize the ui messages. But the entity names, the attributes and the operators desperately remains in English.
Here is what I've done (referring step described on korzh.com.
$(document).ready(function() {
var culture = $('#hidCulture').val();
if (culture.contains('nl')) {
EQ.core.texts = getDutchText();
} else if (culture.contains('fr')) {
EQ.core.texts = getFrenchText();
} else {
EQ.core.texts = getEnglishText();
}
});
The text resource comes from another file and looks like this:
getFrenchText = function() {
return {
Local: "fr",
AltMenuAttribute: "Attribute",
AltMenuAttribute: "Attribut",
...
StrAddColumns: "Ajouter des colonnes",
Entities: {
"Company": "Entreprise",
"Office": "Site",
...
},
Attribute: {
"Company.Name": "Nom",
...
},
Operators: {
"Equal": {
"caption": "Egal à",
"displayFormat": "{expr1} [[est égal à]] {expr2}"
}
};
}
There are other solutions using resource or property files but it doesn't fit my needs. As I understood it doesn't localize entity names.
Here ends the a last-ditch attempt. Has anyone met the same issue?