PDA

View Full Version : Help with new class



da_bar
24 Jul 2009, 3:07 PM
I'm new to ExtJS so sorry if this is an elemental question but I can't find reference anywhere.

I already created a namespace Ext.ux, now I want to add a class Lang (Ext.ux.Lang) that will have a language array (with words in it) and translate(word) function. This language array should be filled with a Language variable I get form database:

Ext.ux.Lang.prototype.language = Language;
And Lang class should not extend anythin as it is a completly new class.
Then I want to be able to call that translate(word) function from anywhere in an application.
Am I missing the point here? Should it be done in a different way?
Could somebody help me?

Thank you