This project is read-only.

Quick start: How to create dutch translation:

  1. Execute NLocalizerApp.exe
    • Click New button to create new translation project and select exe file name
    • Click Import button and select your project file in C# or VB.NET
    • Select source files to read and click Read source files button
    • Select properties to translate and click Write source files button (private will be change to public)
    • Click OK
    • Click Add lang 
    • Select Dutch and click OK (messages will be translated by Google Translator)
    • Click Save
  2. Your project in Visual Studio
    • R-Click References -> Add reference -> NLocalizer.dll
    • R-Click Project -> Add Existing Item -> Dutch.lang and English.lang (Properties -> Copy if newer)
    • Double click Load event in Your form
    • Enter code:
      • C#: NLocalizer.Translator.Translate(this);
      • VB.NET: NLocalizer.Translator.Translate(Me)

See also:

Additional features:

You can insert all controls of your application to translate in text file. It will be compile in runtime. Example 'English.lang' language file:

; Comments, line is ignored
locale en-US, en-GB
module System.dll, System.Windows.Forms.dll, NLocalizer.dll, NLocalizer.Example.exe,
using System, System.Windows.Forms, System.Reflection, NLocalizer, NLocalizer.Example,
static Messages,
(MainForm)Text = my translated text of this form
(MainForm)FileOpenMenu.Text = Open...
(Messages)MyMessage = My example, translated message
  • locale -- list of locales attached to current translation language, separated by comma
  • module --- exe file name and list of DLL files used by translated application, separated by comma
  • using --- list of using items (namespaces), used by translated application, separated by comma
  • static --- list of static classes, separated by comma
  • (FormName)property = text
    • FormName --- name of translated class
    • property -- full access for text property, for example MyTable.Column[0].Caption (must be public)
    • text -- line of translation without ", will be Trim()

Example of Messages static class:

public static class Messages
public static string MyMessage = "My internal, neutral message";
  Import *.Designer.cs
  Read .cs files
  Get translation
  Write .cs files -> private to public controls
  Choose Form
 Copy English.lang to Dutch.lang
 Edit Dutch.lang
 change header: locale nl-NL
 Change "NLocalizer.Example" to your program name
 Visual Studio
 R-Click References - Add reference - Nlocalizer.dll
 R-Click Project - Add Existing Item - Dutch.lang
 Properties - Copy if newer

Last edited Sep 5, 2011 at 12:03 PM by KAP, version 49


No comments yet.