How to set the language of ui in gvim

1,449 views
Skip to first unread message

李哲

unread,
Dec 13, 2016, 9:02:16 AM12/13/16
to vim_use
According to this link I already add the language setting code into my vimrc file.
http://superuser.com/a/921446/609799

"Set The Language Of The Vim"
set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim


But the language on the ui is still CN how to change that ?

1213220017.bmp
1213220035.bmp

Lifu Tang

unread,
Dec 13, 2016, 1:12:37 PM12/13/16
to vim...@googlegroups.com
What you need is a single line of code in your vimrc:

language en_US

By the way, the "source delmenu.vim" and "source menu.vim" trick in vimrc was a work-around to a Vim bug which I believe to be fixed around 10 years ago. I'm quite astonished that people still keep doing that even till today.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Christian Brabandt

unread,
Dec 13, 2016, 1:45:25 PM12/13/16
to vim_use
Hi 李哲!
I am afraid, this might be currently broken:
https://github.com/vim/vim/issues/1082


Best,
Christian
--
Die Liebe besteht zu drei Viertel aus Neugier.
-- Giacomo Girolamo Casanova

skywi...@163.com

unread,
Dec 13, 2016, 1:49:32 PM12/13/16
to vim_use
Hi 李哲!

1. Delete your vim/lang folder

or 

2. Install gvim with "native language ????" disabled.


Tony Mechelynck

unread,
Dec 13, 2016, 11:54:58 PM12/13/16
to vim...@googlegroups.com
It is not always possible or desirable to disable +multi_lang.

Which languages are recognized (and acceptable as argument to the
:language command and its subcommands) depends on your OS and on hos
it is installed.
On Windows, ":language messages en" usually works, ":language
messages C" never does, ":language messages en_US" usually doesn't, "
:language messages English_United States" may or may not work, and I
don't know whether the space in the middle of United States needs a
backslash escape. Without the quotes in each case.
On Unix and similar, the command "locale -a |less", given without
the quotes at a shell prompt, will tell you all recognized language
names

In my experience, the ":language messages LANGUAGENAME" command is one
of the few that should be given before sourcing the vimrc_example.vim
-- the following is how my vimrc begins:

" force English menus and messages regardless of which locale is set in the OS
if has("unix") " including Mac OS X (but not the obsolete Mac OS 9) IIUC
language messages C
else " Windows
language messages en
endif
runtime vimrc_example.vim

etc.

Zhe Lee

unread,
Dec 14, 2016, 10:47:02 PM12/14/16
to vim_use
Hi, tnx a lot for your reply I reinstall the Vim and add the `language en_US` into the vimrc file. But I get the error.
I Google it and change the line to `language messages en_US`, there is no error message pop out. But the UI language still be CN.

![1215114158.bmp](http://7xpvdr.com1.z0.glb.clouddn.com/1215114158.bmp)

Zhe Lee

unread,
Dec 14, 2016, 10:52:40 PM12/14/16
to vim_use

tnx a lot for your reply . I have already tried the command in my vimrc file. But it doesn't work. My os is windows and the native lan is CN.

Zhe Lee

unread,
Dec 14, 2016, 10:55:19 PM12/14/16
to vim_use

I use Vim8 and my os is windows

According to the post here.
https://github.com/vim/vim/issues/1082 which is provided by Christian Brabandt.

Seems the delete the lang folder is the only way that work for me.

Again really appreciate everyone who give me a suggestion every one, I have tried.
TNX : )

Dominique Pellé

unread,
Dec 15, 2016, 6:09:32 AM12/15/16
to Vim List
As was already said, valid languages depend
on the platform.

You can try completion to find valid languages:

:language CTRL-D

It works at least on Linux, but I'm not sure whether it's
implemented on Windows.

Regards
Dominique

Tony Mechelynck

unread,
Dec 17, 2016, 8:48:31 PM12/17/16
to vim...@googlegroups.com
On Windows, AFAIK ":language messages en" (without _US) works. Maybe
also ":language messages English_United States" or ":language messages
English_United\ States", I don't know which. OTOH, the experiments
mentioned above seem to indicate that ":language messages en_US" is
not recognized on Windows.

Best regards,
Tony.
Reply all
Reply to author
Forward
0 new messages