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