Localisation

From Notepad++ Wiki
Jump to: navigation, search
How-To Translate Notepad++ to another written language


You can teach Notepad++ to speak your mother tongue: just download english.xml and translate it into your language.

Choosing your translation

When some localisation is selected from the Settings -> Preferences -> General main list, Notepad++ translates its user interface to this language. When using the installer, you are asked to choose a language. The default is english.

You can also use the command line to override this choice using the -L<language code> switch. The language codes are actually locale codes with one or two levels. The supported list is as follows:

  • Some codes are equivalent. When listed explicitly, they are separated by commas.
  • Usually, when a second level locale is not specifically supported, it collapses to its first level. For instance, the code "es-ve" will collapse to "es" for standard spanish. Yet "es-ar" has its own entry for Argentinian, so it does not collapse.
  • Currently thee is no code to switch rto english.xml or english_customizable.xml.
Language codes for -L switch
Language .xml file name Code
afrikaans af
albanian sq
ar
aragonese an
azerbaijani az
basque eu
belarusian be
bengali bn bosnian bs
brazilian_portuguese pt-br
bulgarian bg
catalan ca
chinese zh-tw, zh-hk, zh-sg
chineseSimplified zh, zh-cn
croatian hr
czech cs
danish da
dutch nl, nl-be
esperanto eo
farsi fa
finnish fi
french fr
friulian fur
galician gl
georgian ka
german de
greek el
hebrew he
hindi hi
hungarian hu
indonesian id
italian it
japanese ja
kazakh kk
korean ko, ko-kp, ko-kr
kyrgyz ky
latvian lv
lithuanian lt
luxembourgish lb
macedonian mk
malay ms
norwegian no, nb
nynorsk nn
occitan oc
polish pl
portuguese pt
romanian ro
russian ru
sardinian sc
serbian sr
sinhala si
slovak sk
slovenian sl
spanish es
spanish_ar es-ar
swedish sv
tagalog tl
tamil ta
telugu te
thai th
turkish tr
ukrainian uk
uzbek uz

General notes for translators:

  1. All the English words in the 'name' attribute should be translated.
  2. All the numbers which are not in the 'name' attribute (the attributes 'id', 'order', 'posX' and 'posY') should NOT be changed.
  3. & in the Tag Menu is &, it takes effect (draw a underline on a letter) when user pushes the Alt key. So it's up to you to change its position, it depends on the menu convention of your language.
  4. Try not to make your translations longer than the English captions, since the controls in dialogs won’t be resized dynamically. Since the english language tends to be terse, some margin has been set aside for longer translations - when possible.

Example:

The translation of 'Paste' in French is 'Coller', so the XML Tag translation from English to French should be:

from:

<Item id="42005" name="&Paste"/>

to:

<Item id="42005" name="C&oller"/>

assuming the & is correclty placed. This depends on language conventions and menu contents.

How to test your translation:

  1. Rename english.xml to nativeLang.xml
  2. Click Start->Run to have the run box, type %APPDATA%\Notepad++ in it and Enter. An opened directory window will appear. If the Notepad++ Install Folder is elsewhere, that is the path you should enter.
  3. Copy nativeLang.xml into the opened directory.
  4. Exit Notepad++ then relaunch it.

Removing nativeLang.xml will restore the English version. If there was a mistake in the localisation file, and that the mnu system was missing entries as a result, this action may bring them back.

Right-to-Left languages:

In order to enable RTL mode in Notepad++, you need to add RTL="yes" to the Native-Langue node, resulting in:

<Native-Langue RTL="yes">

Using the "no" value or omitting the attribute will set Notepad++ to use LTR mode (default). Note that the Scintilla component can be set to LTR or RTL independently from Notepad++, but it will default to the type of the language.