Click or drag to resize

Localization of Patagames WinForms Controls

Localization is the process of making application multilingual by formatting the content according to the cultures. This involves configuring the application for a specific language. Culture is the combination of language and location. For example, en-US is the culture for English spoken in United States; en-GB is the culture for English spoken in Great Britain.

Patagames components support localization and have their own neutral resources. These resources can be localized as per the customer requirement, using .resx files.

Localize WinForms applications using .resx file

Changing application culture

When you are changing the application culture, then you can localize the application based on application culture by creating .resx file.

public partial class Form1 : Form
    public Form1()
        Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("de-DE");
        Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("de-DE");

Creating .resx files

You can create .resx files for any languages by following steps:

  1. Get the default resource and image files from Patagames.Pdf.WinForms.dll and Patagames.Pdf.dll/Others folders from GitHub.

  2. Right click your project and click New Folder and set name as Resources.

  3. Add Patagames.Pdf.Net.Controls.WinForms.Properties.PdfToolStrip.resx resource file into Resources folder.

    Also copy all the images to this folder (You can not add them to the project, just copy to a folder on the file system)

    Localization 01
  4. Now, right click on Resources folder and select Add and then New Item. In the Add New Item wizard, select Resources File option and name the file name as <default resource file name>.<culture name>.resx. For example, you have to give name as for German culture. In the same way, add new resource files for other default resource files.

    Localization 02
  5. Now, select Add and add resource file for German culture in Resources folder.

    Localization 03
  6. Now, you can copy the key names from default resource files and change its corresponding value based on the culture.

    Localization 04

Editing default culture settings

You can change the default string of any control by adding the default .resx files (from GitHub) to Resources folder of your application. All Patagames controls reads the default string from the .resx files of application if its added.

See Also