Change menu/ui language of vim to english

21,154

Solution 1

My native language is Chinese and I use Windows 7. I tried to do this like you did before, finally I tried to writing the following in _vimrc file and it worked for me.

set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim

Solution 2

In case of Gvim it is quite simple to change the language of the gui part of gvim

Go to C:\Program Files (x86)\Vim\vim74\lang
and remove all folders... and restart gvim then it will open in English...

Solution 3

It works for me to simply add one line

language en_US.utf8

at the top of .vimrc.

Since en_US.utf8 is the output of you $ locale -a command, you should use

language en_US.utf8

instead of

language en_US.UTF-8

Solution 4

I've used different settings:

language messages English_United States
set langmenu=en_US.UTF-8  

This worked for me. I added this at the top of _vimrc.

I have Windows 10 in Korean, and gVim 8.0.586

Solution 5

From :help :language:

Some systems accept aliases like "en" or
"en_US", but some only accept the full specification
like "en_US.ISO_8859-1".  On Unix systems you can use
this command to see what locales are supported:
    :!locale -a

On my Ubuntu machine, I get

$ locale -a
C
C.UTF-8
en_US.utf8
POSIX

So maybe the problem is "utf8" vs. "UTF-8".

From :help 'langmenu':

This option must be set before loading menus, switching on filetype
detection or syntax highlighting.  Once the menus are defined setting
this option has no effect.  But you could do this:
    :source $VIMRUNTIME/delmenu.vim
    :set langmenu=de_DE.ISO_8859-1
    :source $VIMRUNTIME/menu.vim

From the comments, you tried putting it at the top of your vimrc. Perhaps there is a system vimrc file that gets in the way. Check with :version or :scriptnames. If so, then add something like the suggested lines.

Share:
21,154

Related videos on Youtube

res1
Author by

res1

Updated on September 18, 2022

Comments

  • res1
    res1 over 1 year

    I search on google and I read several answers but I am unable to change the menu/ui language of vim to english.

    Im my .vimrc I have

    set langmenu=en_US.UTF-8
    language messages en_US.UTF-8
    

    but it doesn't work, vim uses the default language of my system.

    I tried

    set langmenu=none

    but it's the same.

    locale en_US.UTF-8 is installed.

    I am using vim 7.4 on ubuntu.

    Thanks for the help.

  • David Richerby
    David Richerby almost 9 years
    This is not a good suggestion. Even if it works, deleting files is a very dangerous way to achieve what is a simple configuration change: it can lead to instability if it turns out that the files were more important than you thought, and cause problems for upgrades. And it's irreversible: what if the asker decides next week that they prefer vim in some other language?
  • David Richerby
    David Richerby almost 9 years
    Also, the asker says they're using Ubuntu; the location you suggest exists only on Windows.
  • samba8514
    samba8514 almost 9 years
    David, Thanks for your comment.. I got the same issue in the Windows machine and I tried it by removing the corresponding folder and it worked... I agreed removing of folder is not a safe way to solve this problem... but this is one of the way to solve the probleam
  • user333869
    user333869 almost 7 years
    your headline doesn't say anything about the platform thus users on windows looking for the same problem will find your question too. In your text you state about Ubuntu but users seeking a solution for windows are then off topic. I supply an answer here for those. So don't be so selfish to accept only answers for yourself.
  • Tomasz W
    Tomasz W over 6 years
    This one worked for me with Vim 8.x in Cygwin. Thanks
  • TamaMcGlinn
    TamaMcGlinn over 4 years
    Thank you; this is the best answer on Windows. The only other answer that worked for me was deleting the directory for the other language, so that it defaulted to english.
  • T_T
    T_T over 2 years
    The first two lines worked for neovim on macOS.