to the Vim
maintainer <maintainer@vim.org>. Or both.
==============================================================================
*45.2* Language for Menus
The default menus are in English. To be able to use your local language, they
must be translated. Normally this is automatically done for you if the
environment is set for your language, just like with messages. You don't need
to do anything extra for this. But it only works if translations for the
language are available.
Suppose you are in Germany, with the language set to German, but prefer to
use "File" instead of "Datei". You can switch back to using the English menus
this way: >
:set langmenu=none
It is also possible to specify a language: >
:set langmenu=nl_NL.ISO_8859-1
Like above, differences between "-" and "_" matter. However, upper/lowercase
differences are ignored here.
The 'langmenu' option must be set before the menus are loaded. Once the
menus have been defined changing 'langmenu' has no direct effect. Therefore,
put the command to set 'langmenu' in your vimrc file.
If you really want to switch menu language while running Vim, you can do it
this way: >
:source $VIMRUNTIME/delmenu.vim
:set langmenu=de_DE.ISO_8859-1
:source $VIMRUNTIME/menu.vim
There is one drawback: All menus that you defined yourself will be gone. You
will need to redefine them as well.
DO-IT-YOURSELF MENU TRANSLATION
To see which menu translations are available, look in this directory:
$VIMRUNTIME/lang ~
The files are called menu_{language}.vim. If you don't see the language you
want to use, you can do your own translations. The simplest way to do this is
by copying one of the existing language files, and change it.
First find out the name of your language with the ":language" command. Use
this name, but with all letters made lowercase. Then copy the file to your
own runtime directory, as found early in 'runtimepath'. For example, for Unix
you would do: >
:!cp $VIMRUNTIME/lang/menu_ko_kr.euckr.vim ~/.config/nvim/lang/menu_nl_be.iso_8859-1.vim
You will find hints for the translation in "$VIMRUNTIME/lang/README.txt".
==============================================================================
*45.3* Using another encoding
Vim guesses that the files you are going to edit are encoded for your
language. For many European languages this is "latin1". Then each byte is
one character. That means there are 256 different characters possible. For
Asian languages this is not sufficient. These mostly use a double-byte
encoding, providing for over ten thousand possible characters. This still
isn't enough when a text is to contain several different languages. This is
where Unicode comes in. It was designed to include all characters used in
commonly used languages. This is the "Super encoding that replaces all
others". But it isn't used that much yet.
Fortunately, Vim supports these three kinds of encodings. And, with some
restrictions, you can use them even when your environment uses another
language than the text.
Nevertheless, when you only edit files that are in the encoding of your
language, the default should work fine and you don't need to do anything. The
following is only relevant when you want to edit different languages.
USING UNICODE IN THE GUI
The nice thing about Unicode is that other encodings can be converted to it
and back without losing information. When you make Vim use Unicode
internally, you will be able to edit files in any encoding.
Unfortunately, the number of systems supporting Unicode is still limited.
Thus it's unlikely that your language uses it. You need to tell Vim you want
to use Unicode, and how to handle interfacing with the rest of the system.
Let's start with the GUI version of Vim, which is able to display Unicode
characters. This should work: >
:set encoding=utf-8
:set guifont=-misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1
The 'encoding' option tells Vim the encoding of the