README.txt 1.8 KB

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