Notepad++ can be “localized” to your chosen written language, so that it translates the user interface (including menu and command names, and the text in dialogs and buttons). It supports this multi-language functionality by using a localization xml file (based on the official english.xml translation) which maps the various user-interface pieces to the appropriate translation. The Notepad++ localization is chosen through the Settings > Preferences > General > Localization interface.
Creating or Editing a translation
Maybe Notepad++ doesn’t currently have the language you would like to use. Or maybe, Notepad++ has been updated recently but the translation file is one or more versions behind, so some of the text isn’t in your selected language. Maybe the official Notepad++ translation for a language doesn’t match your particular usage of that language. Or sometimes, you just want to have some fun rewording things for your own amusement.
The process of teaching Notepad++ a new language is virtually identical to editing an existing language, and both processes are described here:
- Download the official copy of english.xml and save it into the
<Notepad++_Install_Dir>\localization\
directory (see Configuration Files Location). You may need to create thelocalization\
directory first, if it doesn’t already exist.- This will be used as the source for a new translation, and a reference when you are editing an existing language.
- This step depends on whether you are editing an existing language translation, or creating a new translation from scratch:
- For an existing translation: Download the most recent copy of the existing language translation from the localization portion of the code repository and save it into the same folder as
localization\english.xml
.- Note: If you are wanting to change the English text for your own use, please edit
localization\english_customizable.xml
instead oflocalization\english.xml
, sinceenglish.xml
is meant to exist as an “absolute reference” with the official names of each of the text entries.
- Note: If you are wanting to change the English text for your own use, please edit
- For a new translation for a language that Notepad++ doesn’t already have: Copy
localization\english.xml
tolocalization\<yourlanguagename>.xml
- For an existing translation: Download the most recent copy of the existing language translation from the localization portion of the code repository and save it into the same folder as
- Edit
localization\<yourlanguagename>.xml
- Make sure the initial
<?xml ... ?>
tag indicatesencoding="utf-8"
. - Update the
<Native-Langue...>
tag near the top of the file:- Make sure the
name="___"
attribute matches your language’s native name. This is the name that will show up in the Preference dialog’s Localization pulldown - Make sure the
filename="___.xml"
matches your language name - Make sure
version="8.1.1"
matches the most-recent Notepad++ version number. It should already match, if you downloaded the most recentenglish.xml
as described above.
- Make sure the
- Edit the
name="..."
attributes as appropriate for the language you are editing.- Note: Do not change any of the
id="###"
orsubMenuId="xxx"
attributes, as those are used to map the text in thename="..."
attribute to the right piece of text in Notepad++. If you change those, the localization file will not work properly. - You may use XML character entities for characters. (Note: unlike HTML, XML only has 5 predefined named entities; all other characters require numeric or hexadecimal entities.)
- If the encoding was properly set (above), you may insert Unicode characters directly.
- When possible, keep the translated text about the same length (in characters) as the original English; this will help make sure the translation will fit in menus and dialog boxes which were designed to fit the official English text.
- Note: Do not change any of the
- If you are going to share your localization file with others, you must define accelerator letters for critical menu commands.
- These accelerator letters are the letters you see underlined in menus.
- These are used for quickly activating a menu entry from the keyboard when the menu is active.
- For example, the File menu’s New command has an accelerator of
N
defined in the default English localization file, so when the File menu is displayed, typingN
will run that command.
- For example, the File menu’s New command has an accelerator of
- This is separate from the keyboard shortcut used while editing.
- For example, the File menu’s New command has a default keyboard shortcut of Ctrl+N, which can be used anytime the editor section of Notepad++ is active. But if you have the File menu showing, Ctrl+N does nothing; instead, you have to use the accelerator.
- Thus, even commands that have keyboard shortcuts should also have accelerators defined.
- These are used for quickly activating a menu entry from the keyboard when the menu is active.
- To define the accelerator character, you need to put an ampersand
&
before the appropriate character in your translation text.- Because the localization file is in XML, and
&
has a special meaning to XML, you need to use the string&
before the letter in your translation string. - For example, to underline the
E
inSuper Edit
, your string would need to be defined asSuper &Edit
in the XML:<Item id="#####" name="Super &Edit"/>
- Because the localization file is in XML, and
- To know which commands are critical to have accelerators for, please use the official
english.xml
as a guide: any string that includes the&
notation in the officialenglish.xml
should also include the&
in your translation. - Users of Notepad++ (and any Windows application) expect menus to have these accelerator keys.
- If you neglect to define them, or choose not to, you will be breaking the expectation of the users of your translation.
- Further, you may be inhibiting usability for people who must use (or prefer to use) the keyboard for controlling Notepad++.
- These accelerator letters are the letters you see underlined in menus.
- Make sure the initial
- To see the changes take effect, save the file, then go to Settings > Preferences > General > Localization and select
<yourlanguagename>
from the pulldown menu: this will copylocalization\<yourlanguagename>.xml
tonativeLang.xml
and will immediately update the Notepad++ application to use the text from your saved XML file.- Note: If you do not see the right language in the pulldown, you need to make sure you put the XML file(s) in the right directory, as explained above.
- You may actually do the process of saving the file then selecting Localization =
<yourlanguagename>
throughout your development of the translation, to be able to see the changes you make as you go.
Share your translation
If you have updated an existing translation to match the most recent version of Notepad++, or if you have created a translation for a new language that isn’t currently available in Notepad++, you may want to request that it get added to the Notepad++ codebase, so that it will be distributed with the next version of the application. To do so, create your own fork of the codebase and make a Pull Request to ask that your translation be added to the main repository; if you do not know how to make Pull Requests, see the GitHub documentation; or you may create an issue asking for the tranlsation to be updated, and attach your XML file to the issue. Before making any Pull Request, please read and understand and follow the Rules for Contributing to Notepad++'s codebase.