7

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.

  • 1
    I've always used language messages C. – Ingo Karkat Apr 26 '14 at 18:52
  • @IngoKarkat seems to work for the messages but I am still unable to get menu in english, in my opinion vim loads the menu before reading my setting even if they are at the top of my .vimrc and so it uses the default ones – res1 Apr 26 '14 at 20:21
11

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 flowing in _vimrc and it worked for me.

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

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...

  • 2
    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 Jun 12 '15 at 8:26
  • 1
    Also, the asker says they're using Ubuntu; the location you suggest exists only on Windows. – David Richerby Jun 12 '15 at 12:07
  • 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 – samba8514 Aug 13 '15 at 21:26
2

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

1

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.

1

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

  • This one worked for me with Vim 8.x in Cygwin. Thanks – Tomasz W Sep 28 '17 at 13:04
0

Did you put your language settings at the beginning of the vimrc? I have encountered once when I put the lang English after some default settings like

source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim

The display of gVim will still be Chinese.

-2

On windows it was sufficient for me to just add an environment variable LANG with value en_US.utf8
You can do this with

setx LANG en_US.utf8

or setx /M LANG en_US.utf8 if you want it system wide

  • 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. – user333869 Jul 19 '17 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.