Native Windows GUI: Internationalization

Native-Windows-GUI supports internationalization with the help of the Windows National language support (nls). NWG wraps the API in a few structures and functions.

In this section, you will learn how to use the NLS wrappers

The Locale object

The locale object is where the bulk of the wrapper is. A locale object is constructed from a locale string and can be then used to query information about the locale. There's a lot of information that can be extracted from a locale object. See the Locale documentation for the methods.
let fr_locale = nwg::Locale::from_str("fr");
let en_us_locale = nwg::Locale::from_str("en-US");
let user_locale = nwg::Locale::user();
let locales: Vec<String> = nwg::Locale::all();

user_locale.display_name();

Controls

Controls that must be localized (ex: the datetime picker) use the user locale.

Examples