NLocalizationManager how to work with it


Author
Message
JSW W.
JSW W.
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
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.
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K
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.
JSW W.
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
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,
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search