Wisej is fully localizable using .NET and Visual Studio standard localization features.
All the top level controls in Wisej support UI localization.
To enable the localization features for a Form, Page, UserControl, or Desktop component, when in design mode set the Localizable property to true. After the localization feature is enabled, you can switch the language in the designer.
To switch the language, use the Language drop down property to select the language to localize
UI localization lets you change a large number of properties in relation to a language switch. The most common are the Size, Location, Text, Colors, and Images.
Wisej also supports the full localization of system resources, such as the buttons in the MessageBox and the labels (month and day names) in the calendar controls, as well as all the standard numeric, percentage and currency formatting and parsing.
- Numeric, Percentage, Date, and Currency FormatsYou don't have to do anything, it's all handled automatically for just about any language in the world.
- Date Labels: Months and Day NamesAlso in this case you don't have to do anything, it's all handled automatically for just about any language in the world.
- System ResourcesAt the time, all Wisej system resources are localized in English, German, French, Italian, Turkish, Spanish and Portuguese. You have to provide the localization in any other language. All you need to do is to create a Resources-[LANG].resx file either in the root folder of the project or in the /Resources folder and add the labels to localize. See How to: Create a Localized Version of a Resource File.
In addition to formatting, parsing, system labels and controls, you will most likely need to localize other resources (strings, images, ...) used in the code of your application.
In your code you can simply create an instance of the ResourceManager Class and use it to retrieve the localized values. Wisej takes care of switching the culture of the thread that is managing the client request.
var RS = new ResourceManager("Localization.Resources", this.GetType().Assembly);
var title = RS.GetString("Title");
Dim RS as ResourceManager = new ResourceManager("Localization.Resources", Me.GetType().Assembly)
Dim title as String = RS.GetString("Title")
Wisej automatically recognizes the browser's language and switches all the application and system resources to use the browser's language.
You may force the application (user session) to run using a specific language setting the culture property in Default.json. The default value is "auto". See Configuration for more information about setting the application's culture.
You may also always force the user session to use a specific language in two alternative ways:
- Set the culture by assigning Application.CurrentCulture property.
When the current culture changes from the original culture loaded when the session was started, Wisej fires the Application.CultureChanged event.