Profile Picture

NLocalizationManager how to work with it

Posted By JSW W. 13 Years Ago
Author
Message
JSW W.
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1
Hi

I read about NLocalizationManager but I am still not so sure what it does.
This is for Nevron internal string only, or can it use for my application e.g. menu localization ?

Could you give example on how can i, translate a menu text or a label text in 3 languages. in your example i did not see how it change any text.

Also can it be use on a website as well as in winform?

Thanks,

Nevron Support
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009
Hello JSW W.,

Basically, NLocalizationManager is a singleton class that collects numbers of NDictionary objects and applies concrete one on certain string properties.

Let say that you have a button which Text property you want to translate on 2 languages.
First you need to create 2 NDictionary objects for each language:

NDictionary nDictionary1 = new NDictionary("nDictionary1");
NDictionary nDictionary2 = new NDictionary("nDictionary2");

Then add record to each one for the button text. First parameter in Add method is the value of key, and the second parameter is the translated value:

nDictionary1.Add("Button 1", "Button on 1st language");
nDictionary1.Add("Button 1", "Button on 2nd language");

Add these dictionaries in the localization manager as follows:
NLocalizationManager.Instance.AddDictionary(nDictionary1);
NLocalizationManager.Instance.AddDictionary(nDictionary2);

Lastly you need to apply the desired dictionary to translate the texts:

Button1.Text = NLocalizationManager.Instance.Translate("Button 1", "nDictionary1");

You can use NLocalizationManager to translate any string property.
To use it you only need to have reference to Nevron.System assembly.



Best Regards,
Nevron Support Team



JSW W.
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)Supreme Being (127 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 127, Visits: 1
hi
I could right click and see the context menu in different language.

However, I still need example how could i apply for my application for instance to change the text of label control, header table etc.



Similar Topics


Reading This Topic