7
|
1 Language files for Vim
|
|
2
|
|
3 Translated menus
|
|
4 ----------------
|
|
5
|
|
6 The contents of each menu file is a sequence of lines with "menutrans"
|
|
7 commands. Read one of the existing files to get an idea of how this works.
|
|
8
|
|
9 More information in the on-line help:
|
|
10
|
|
11 :help multilang-menus
|
|
12 :help :menutrans
|
|
13 :help 'langmenu'
|
|
14 :help :language
|
|
15
|
|
16 The "$VIMRUNTIME/menu.vim" file will search for a menu translation file. This
|
|
17 depends on the value of the "v:lang" variable.
|
|
18
|
|
19 "menu_" . v:lang . ".vim"
|
|
20
|
|
21 When the 'menutrans' option is set, its value will be used instead of v:lang.
|
|
22
|
|
23 The file name is always lower case. It is the full name as the ":language"
|
|
24 command shows (the LC_MESSAGES value).
|
|
25
|
|
26 For example, to use the Big5 (Taiwan) menus on MS-Windows the $LANG will be
|
|
27
|
|
28 Chinese(Taiwan)_Taiwan.950
|
|
29
|
|
30 and use the menu translation file:
|
|
31
|
|
32 $VIMRUNTIME/lang/menu_chinese(taiwan)_taiwan.950.vim
|
|
33
|
|
34 On Unix you should set $LANG, depending on your shell:
|
|
35
|
|
36 csh/tcsh: setenv LANG "zh_TW.Big5"
|
|
37 sh/bash/ksh: export LANG="zh_TW.Big5"
|
|
38
|
|
39 and the menu translation file is:
|
|
40
|
|
41 $VIMRUNTIME/lang/menu_zh_tw.big5.vim
|
|
42
|
|
43 The menu translation file should set the "did_menu_trans" variable so that Vim
|
|
44 will not load another file.
|
|
45
|
|
46
|
|
47 AUTOMATIC CONVERSION
|
|
48
|
|
49 When Vim was compiled with multi-byte support, conversion between latin1 and
|
|
50 UTF-8 will always be possible. Other conversions depend on the iconv
|
|
51 library, which is not always available.
|
|
52 For UTF-8 menu files which only use latin1 characters, you can rely on Vim
|
|
53 doing the conversion. Let the UTF-8 menu file source the latin1 menu file,
|
|
54 and put "scriptencoding latin1" in that one.
|
|
55 Other conversions may not always be available (e.g., between iso-8859-# and
|
|
56 MS-Windows codepages), thus the converted menu file must be available.
|
|
57
|
|
58
|
|
59 Translated messages
|
|
60 -------------------
|
|
61
|
|
62 This requires doing "make install" in the "src" directory. It will compile
|
|
63 the portable files "src/po/*.po" into binary ".mo" files and place them in the
|
|
64 right directory.
|