Dominique Pelle wrote:

> I'm using Vim-7.2.88 on Linux x86.  My current locale
> is en_US.UTF-8.  I have noticed that Vim command...
> 
>   :language message es_ES.UTF-8
> 
> ... fails to switch languages of messages to Spanish.
> It gives the following error message:
> 
> E197: Cannot set language to "es_ES.UTF-8"
> 
> It happens because locale es_ES.UTF-8 is not
> installed on my system (i.e. if it's listed in "locale -a")
> and command ":language message ..." apparently
> only allows to switch messages to a language if locale
> is installed.
> 
> However, if I now set the environment variable LANGUAGE
> prior to starting Vim to "es_ES.UTF-8" then Vim
> successfully displays messages in Spanish (even though
> es_ES.UTF-8 is still not installed on my machine).
> 
> It's odd an inconsistent.
> 
> If Vim can use Spanish language when setting
> LANGUAGE env variable, why couldn't it allow me
> to switch to Spanish with the command
> ":language message es_ES.UTF-8" earlier?
> 
> Furthermore, once I set LANGUAGE env
> variable to es_ES.UTF-8, start Vim and if I then
> type ":language message" to see the current
> language, Vim reports:
> 
> Idioma actual =ABmessages =BB: =ABen_US.UTF-8=BB.
> 
> ... which is rather inconsistent since messages
> are obviously in Spanish, but command says it's
> en_US.UTF-8 (my current locale).
> 
> The same thing happens on Windows.  I can't
> switch to eo_XX.UTF-8 for example in Windows
> using ":lang mess eo_XX.UTF-8", but I can switch
> to that language is I put LANG=3Deo_XX.UTF-8 in
> the Windows environment variables.
> 
> Being able to change language even when locale
> is not installed with ":lang mess ..." would be useful.

I can reproduce it.  I do have the es_ES.UTF-8 locale, but when using
es_ES.utf-8 (lower case) it fails like you describe.

I haven't yet looked at why this would happen.  Might have something to
do with the gettext library (libintl).

-- 
If Pacman had affected us as kids we'd be running around in dark rooms,
munching pills and listening to repetitive music.
                       -- Marcus Brigstocke

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to