View Full Version : Translation of big projects

28 Jun 2010, 5:24 AM

I'm developing a project with alot of elements and i need it to be multilingual.

The translations are done in the PHP area where the customer are able to create new languages and translate by a webinterface with a key/value system which are cached into eg. a json object.

In the project there will be more than 200 objects and i find the Ext.apply/Ext.override method to be a mess with that many translations or prehaps i just didn't find a good way to do it yet.

My thoughts was to simply include the translations as a variable and define the translation in the js defintion of the objects.

Well, i hope someone can point me in the right direction for solving this in a good and simple way.

28 Jun 2010, 5:30 AM
The only reason the Ext locale files do it that way is because certain components may or may not exist. You can just use a simple object literal.

var Lang = {
foo: 'Text 1',
bar: 'Text 2'