Oops... Hit "Send" too early the first time.

On 26/01/09 20:21, Dominique Pelle wrote:
> Hi
>
> 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 «messages »: «en_US.UTF-8».
>
> ... 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=eo_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.
>
> -- Dominique

Try ":lang messages es_ES" (without UTF-8) instead. If your gvim uses 
GTK2, it's probably set up for UTF-8 anyway.

I remember when I used double-boot, my Windows system and my Linux 
system didn't call the language I wanted by the same name, so my 
(shared) vimrc used

        if has('unix')
                language messages C
        else
                language messages en
        endif

which worked on both to avoid messages in French (and later in Dutch, 
after sending the laptop to 's-Hertogenbosch to replace a crashed HD 
under warranty).


Best regards,
Tony.

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

Reply via email to