How To Use MetroFramework Localization

How To Use MetroFramework Localization

On this tutorial I will show you on how to use metroframework localization. On the previous release MetroMessagebox and MetroToggle can now be localized or will allow you to change the language of the buttons. The language will change will be based on the culture info that is set on your application.

To change the culture information of your application you first need to know the Windows Locale code of the language that you want to use. Please refere to this link for the list of Windows Locale Codes.

Here is the code to change the culture information of your application.

System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("de-DE");
Application.CurrentCulture = cultureInfo;

On your project you need to add a folder named Localization and under that folder create a folder with the name of the Windows Locale code that you want to use. For example de for Germany.

Proceed to next page for the XML format

Liked it? Take a second to support denricdenise on Patreon!

You may also like...