annotate runtime/doc/mlang.txt @ 18488:1d7e6b677119

Added tag v8.1.2238 for changeset 5b95ccb82c0a40200e87ba6b07455e6dfaa31f22
author Bram Moolenaar <Bram@vim.org>
date Fri, 01 Nov 2019 20:00:05 +0100
parents 0e473e9e70c2
children af69c9335223
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16553
0e473e9e70c2 patch 8.1.1280: remarks about functionality not in Vi clutters the help
Bram Moolenaar <Bram@vim.org>
parents: 14881
diff changeset
1 *mlang.txt* For Vim version 8.1. Last change: 2019 May 05
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 VIM REFERENCE MANUAL by Bram Moolenaar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 Multi-language features *multilang* *multi-lang*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 This is about using messages and menus in various languages. For editing
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 multi-byte text see |multibyte|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 The basics are explained in the user manual: |usr_45.txt|.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 1. Messages |multilang-messages|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 2. Menus |multilang-menus|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 3. Scripts |multilang-scripts|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 Also see |help-translated| for multi-language help.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 {not available when compiled without the |+multi_lang| feature}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 1. Messages *multilang-messages*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 Vim picks up the locale from the environment. In most cases this means Vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 will use the language that you prefer, unless it's not available.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 To see a list of supported locale names on your system, look in one of these
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 directories (for Unix):
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 /usr/lib/locale ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 /usr/share/locale ~
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 Unfortunately, upper/lowercase differences matter. Also watch out for the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 use of "-" and "_".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 *:lan* *:lang* *:language* *E197*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 :lan[guage]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 :lan[guage] mes[sages]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 :lan[guage] cty[pe]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 :lan[guage] tim[e]
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 Print the current language (aka locale).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 With the "messages" argument the language used for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 messages is printed. Technical: LC_MESSAGES.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 With the "ctype" argument the language used for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 character encoding is printed. Technical: LC_CTYPE.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 With the "time" argument the language used for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 strftime() is printed. Technical: LC_TIME.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 Without argument all parts of the locale are printed
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 (this is system dependent).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 The current language can also be obtained with the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 |v:lang|, |v:ctype| and |v:lc_time| variables.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 :lan[guage] {name}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 :lan[guage] mes[sages] {name}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 :lan[guage] cty[pe] {name}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 :lan[guage] tim[e] {name}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 Set the current language (aka locale) to {name}.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 The locale {name} must be a valid locale on your
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 system. Some systems accept aliases like "en" or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 "en_US", but some only accept the full specification
2348
8878a9f8db87 Rename w_p_conceal to w_p_conc for consistency.
Bram Moolenaar <bram@vim.org>
parents: 2345
diff changeset
60 like "en_US.ISO_8859-1". On Unix systems you can use
3281
af1e8a1714c2 Update runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2681
diff changeset
61 this command to see what locales are supported: >
2348
8878a9f8db87 Rename w_p_conceal to w_p_conc for consistency.
Bram Moolenaar <bram@vim.org>
parents: 2345
diff changeset
62 :!locale -a
8878a9f8db87 Rename w_p_conceal to w_p_conc for consistency.
Bram Moolenaar <bram@vim.org>
parents: 2345
diff changeset
63 < With the "messages" argument the language used for
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 messages is set. This can be different when you want,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 for example, English messages while editing Japanese
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 text. This sets $LC_MESSAGES.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 With the "ctype" argument the language used for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 character encoding is set. This affects the libraries
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 that Vim was linked with. It's unusual to set this to
2681
85c5a72551e2 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2577
diff changeset
70 a different value from 'encoding' or "C". This sets
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 $LC_CTYPE.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 With the "time" argument the language used for time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 and date messages is set. This affects strftime().
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 This sets $LC_TIME.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 Without an argument both are set, and additionally
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 $LANG is set.
1619
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
77 When compiled with the |+float| feature the LC_NUMERIC
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
78 value will always be set to "C", so that floating
b9740fb41986 updated for version 7.2a
vimboss
parents: 1239
diff changeset
79 point numbers use '.' as the decimal point.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 This will make a difference for items that depend on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 the language (some messages, time and date format).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 Not fully supported on all systems
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 If this fails there will be an error message. If it
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 succeeds there is no message. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 :language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 Current language: C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 :language de_DE.ISO_8859-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 :language mes
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 Current messages language: de_DE.ISO_8859-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 :lang mes en
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 MS-WINDOWS MESSAGE TRANSLATIONS *win32-gettext*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 If you used the self-installing .exe file, message translations should work
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 already. Otherwise get the libintl.dll file if you don't have it yet:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 http://sourceforge.net/projects/gettext
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 5294
diff changeset
99 Or:
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 5294
diff changeset
100 https://mlocati.github.io/gettext-iconv-windows/
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 This also contains tools xgettext, msgformat and others.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
14881
35aff6b8a2c7 patch 8.1.0452: MS-Windows: not finding intl.dll
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
104 libintl.dll should be placed in same directory as (g)vim.exe, or one of the
35aff6b8a2c7 patch 8.1.0452: MS-Windows: not finding intl.dll
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
105 directories listed in the PATH environment value. Vim also looks for the
35aff6b8a2c7 patch 8.1.0452: MS-Windows: not finding intl.dll
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
106 alternate names "libintl-8.dll" and "intl.dll".
35aff6b8a2c7 patch 8.1.0452: MS-Windows: not finding intl.dll
Bram Moolenaar <Bram@vim.org>
parents: 14421
diff changeset
107
7659
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 5294
diff changeset
108 Message files (vim.mo) have to be placed in "$VIMRUNTIME/lang/xx/LC_MESSAGES",
07f11de5efca commit https://github.com/vim/vim/commit/85084ef1e999dcf50e8d466106a33bac24a0febb
Christian Brabandt <cb@256bit.org>
parents: 5294
diff changeset
109 where "xx" is the abbreviation of the language (mostly two letters).
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 If you write your own translations you need to generate the .po file and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 convert it to a .mo file. You need to get the source distribution and read
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 the file "src/po/README.txt".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 To overrule the automatic choice of the language, set the $LANG variable to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 the language of your choice. use "en" to disable translations. >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 :let $LANG = 'ja'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 (text for Windows by Muraoka Taro)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 2. Menus *multilang-menus*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 874
diff changeset
125 See |45.2| for the basics, esp. using 'langmenu'.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 Note that if changes have been made to the menus after the translation was
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 done, some of the menus may be shown in English. Please try contacting the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 maintainer of the translation and ask him to update it. You can find the
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 name and e-mail address of the translator in
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 "$VIMRUNTIME/lang/menu_<lang>.vim".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 To set the font (or fontset) to use for the menus, use the |:highlight|
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 command. Example: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 :highlight Menu font=k12,r12
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 ALIAS LOCALE NAMES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 Unfortunately, the locale names are different on various systems, even though
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 they are for the same language and encoding. If you do not get the menu
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143 translations you expected, check the output of this command: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145 echo v:lang
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 Now check the "$VIMRUNTIME/lang" directory for menu translation files that use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
148 a similar language. A difference in a "-" being a "_" already causes a file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 not to be found! Another common difference to watch out for is "iso8859-1"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150 versus "iso_8859-1". Fortunately Vim makes all names lowercase, thus you
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 don't have to worry about case differences. Spaces are changed to
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 underscores, to avoid having to escape them.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
154 If you find a menu translation file for your language with a different name,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 create a file in your own runtime directory to load that one. The name of
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
156 that file could be: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158 ~/.vim/lang/menu_<v:lang>.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 Check the 'runtimepath' option for directories which are searched. In that
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 file put a command to load the menu file with the other name: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
162
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 runtime lang/menu_<other_lang>.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 TRANSLATING MENUS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 If you want to do your own translations, you can use the |:menutrans| command,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169 explained below. It is recommended to put the translations for one language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 in a Vim script. For a language that has no translation yet, please consider
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 becoming the maintainer and make your translations available to all Vim users.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 Send an e-mail to the Vim maintainer <maintainer@vim.org>.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
173
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
174 *:menut* *:menutrans* *:menutranslate*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
175 :menut[ranslate] clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
176 Clear all menu translations.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
177
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 :menut[ranslate] {english} {mylang}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 Translate menu name {english} to {mylang}. All
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 special characters like "&" and "<Tab>" need to be
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 included. Spaces and dots need to be escaped with a
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 backslash, just like in other |:menu| commands.
11062
1218c5353e2b Runtime file updates.
Christian Brabandt <cb@256bit.org>
parents: 10198
diff changeset
183 Case in {english} is ignored.
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
185 See the $VIMRUNTIME/lang directory for examples.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 To try out your translations you first have to remove all menus. This is how
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 you can do it without restarting Vim: >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 :source $VIMRUNTIME/delmenu.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 :source <your-new-menu-file>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 :source $VIMRUNTIME/menu.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
193 Each part of a menu path is translated separately. The result is that when
13857
e751b5c9dff3 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
194 "Help" is translated to "Hilfe" and "Overview" to "Überblick" then
e751b5c9dff3 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 11062
diff changeset
195 "Help.Overview" will be translated to "Hilfe.Überblick".
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
196
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
197 ==============================================================================
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
198 3. Scripts *multilang-scripts*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 In Vim scripts you can use the |v:lang| variable to get the current language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 (locale). The default value is "C" or comes from the $LANG environment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
202 variable.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 The following example shows how this variable is used in a simple way, to make
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 a message adapt to language preferences of the user, >
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 :if v:lang =~ "de_DE"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208 : echo "Guten Morgen"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 :else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
210 : echo "Good morning"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
211 :endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
212 <
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
213
14421
2f7e67dd088c Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 13963
diff changeset
214 vim:tw=78:sw=4:ts=8:noet:ft=help:norl: