Generating Resource Files

Generate resource files for localizing controls and captions for each locale.

  1. In Visual Studio, select the Form you want to localize, and open it in View Designer.
  2. In the Properties window, set the form's Localizable property to true.
  3. Set the form's Language property to the language of the locale. For example, Chinese (Simplified).
  4. Set the text for the form and the Text property for all buttons to the appropriate text for the locale.
    Note: You can resize a button to accommodate a longer string, if necessary. The button size is persisted in the resource file.
  5. Repeat steps 3 and 4 to add more languages, as required.
  6. Save and build the solution.
  7. Expand Customers.cs.

    The resource files appear under Customers.cs. Customers.resx is the resource file for the default culture, which is built into the main assembly. Resource files for other locales include a language code, and, optionally, a country code. Language and country codes are specified in ISO-639 and ISO-3166, respectively.

    For example, Customers.ch-CHS.resx is the resource file for Chinese as spoken in Chinese (Simplified).