VectorLinux
November 27, 2014, 04:54:43 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Localization of Vector Linux / Локализация Vector Linux  (Read 10159 times)
furydragon
Member
*
Posts: 26


« on: August 22, 2009, 03:50:43 pm »

Localization of Vector Linux / Локализация Vector Linux

Hi!

Everybody wants have UI of his OS on native language. I describe in this article localization of VL for Russian language for graphical and text modes. I couldn't find any finished solutions in Internet so I wrote this article. Such situation have a place because most popular distribution in Russia (Ubuntu) well localized during setup procedure. But VL has a wonderful localization for others languages too!!!

You can find all needed files in the next directories:
  • font files - /usr/share/kbd/consolefont;
  • symbol tables - /usr/share/consoletrans;
  • keyboard layouts - /usr/share/kbd/keymaps/i386/qwerty.
So system uses kbd package.

For russification you need change locale to ru_RU.koi8-r (for VL 6.0 and newer use ru_RU.UTF-8 instead) in file /etc/profile.d/lang.sh and add next strings to the end of file:
Доброго времени суток!

Естественным желанием пользователей является чтобы интерфейс ОС был на их родном языке. В данной статье и рассматриваются способы локализации графического и текстового режимов на примере русского языка. К написанию данной статьи меня подтолкнуло практическое отсутствие законченных решений и рекомендаций. Такое положение дел связано с тем, что наиболее распространённые в России дистрибутивы (Ubuntu) имеют хорошую локализацию, а язык интерфейса системы выбирается еще в самом начале установки. Как оказалось, Vector Linux также отлично поддерживает и другие языки как и английский!!!

Итак, в Vector Linux необходимые файлы расположены в следующих каталогах:
  • файлы шрифтов - /usr/share/kbd/consolefont;
  • символьные таблицы - /usr/share/consoletrans;
  • клавиатурные раскладки - /usr/share/kbd/keymaps/i386/qwerty.
Как видите, в системе используется пакет kbd.

Таким образом, для русификации в файле /etc/profile.d/lang.sh необходимо установить локаль ru_RU.koi8-r (для VL 6.0 и новее используйте ru_RU.UTF-8) и в конец файла добавить следующие строки:
Code:
loadkeys /usr/share/kbd/keymaps/i386/qwerty/ru.map
setfont  /usr/share/kbd/consolefonts/Cyr_a8x16
mapscrn  /usr/share/kbd/consoletrans/koi2alt
echo -ne "\033(K"
Code:
loadkeys /usr/share/kbd/keymaps/i386/qwerty/ru.map
setfont  /usr/share/kbd/consolefonts/Cyr_a8x16
mapscrn  /usr/share/kbd/consoletrans/koi2alt
echo -ne "\033(K"
Last four strings needed for russification of text mode.
This file executed on every login to console. So "magic" string (echo -ne "\033(K") writes only one time but not seven. (This string needed for changing codepage 866 that is Russian codepage for DOS).
So change file /etc/profile.d/lang.csh.
For changing layouts in text mode use right ctrl.

PS.
1) You can see all locales in your system by command locale -a.
2) For russification of graphical mode you can change locale only, but there are can be some problems in text mode.

I suppose this article helps in distribution Vector Linux in Russia.
Последние 4 строки нужны для русификации текстового режима.
Данный файл исполняется при каждой регистрации в консоли, поэтому "магическая строка" (echo -ne "\033(K") указана только один раз, а не семь. (Она служит для перекодировки из кодовой страницы 866 - русская кодировка в DOS).
Аналогичным образом рекомендуется изменить файл /etc/profile.d/lang.csh.
Для переключения раскладок в текстовом режиме служит right ctrl.

PS.
1) Список доступных в системе локалей можно получить с помощью команды locale -a.
2) Для русификации только графического режима достаточно только выставить локаль, но тогда будут проблемы с текстовым режимом.

Надеюсь, данная заметка будет способствовать более широкому распространению Vector Linux в России.
« Last Edit: September 07, 2012, 06:32:56 am by furydragon » Logged
maxz
Member
*
Posts: 3


« Reply #1 on: September 04, 2009, 06:02:08 am »

не работает этот метод в vector 6.0 light  Sad
только того что некоторые надписи в интерфейсе стали по русски. а больше ничего - в консоли кракозябры, переключение не работает, пробовал все мыслимые сочетания клавиш...
локаль в списке присутствует, пакет kbd установлен
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3192



« Reply #2 on: September 04, 2009, 06:05:24 am »

English translations please
Logged

maxz
Member
*
Posts: 3


« Reply #3 on: September 04, 2009, 07:15:51 am »

furydragon told vectorlinux russian localization method. I said that method is not working on vectorlinux 6.0 light. It brought some russian elements to GUI and nothing else.

sorry my ugly english  Embarrassed
Logged
furydragon
Member
*
Posts: 26


« Reply #4 on: September 04, 2009, 01:15:46 pm »

1) This method was tested on VL 5.8 and 5.9 of all editions. I have wonderful results! But concentrate your sight on the second part of my article where I described localization for text mode! This necessary for full localization as text as and GUI modes (vasm scripts can send to the screen strange symbols in GUI mode if you didn't do this).

2) I have little time last month, but I promise all users of VL inspect localization on russian language and VL 6.0 different editions. I think it similar to VL 5.8 and 5.9.

3) English isn't my native language and it describes why my topic wasn't on English. Also it for russian language peoples. But I thought about translation and publishing my topic on 2 languages. Thank you for support and interest with it!!!
At short time I translate my topic.

4) For switching keyboard, you must have 2 or more keytables in your /etc/X11/xorg.conf. For more information see manuals. Switching in text mode - right ctrl.

P.S. Excuse me for my bad english. If you can, correct me.
Thank you!!!
Logged
maxz
Member
*
Posts: 3


« Reply #5 on: September 05, 2009, 12:55:01 am »

Thanks for reply!
I make all your config changes exactly but I have only umlyauts, appears in text mode.
Can you find some free time and make russian localization script? It will be really GREAT! Ordinary users, like me, want solution from-the-box, not reading ton of manuals  Smiley
Logged
dima
Member
*
Posts: 10


« Reply #6 on: November 24, 2009, 07:42:04 pm »

Нихрена это не работает. In VL6.0 Gold nothing work, I mean.

Command 'echo некоторый текст' > file.txt -- will save my string in UTF-8. However, everywhere I have set 'KOI8-R' variable according to the given HOWTO. Help system of the Midnight commander are totaly unreadable.
« Last Edit: November 25, 2009, 02:48:52 am by dima » Logged
furydragon
Member
*
Posts: 26


« Reply #7 on: May 04, 2012, 06:06:44 am »

Нихрена это не работает. In VL6.0 Gold nothing work, I mean.

Command 'echo некоторый текст' > file.txt -- will save my string in UTF-8. However, everywhere I have set 'KOI8-R' variable according to the given HOWTO. Help system of the Midnight commander are totaly unreadable.


What is your default terminal? Is it xterm or it clones?
Logged
Gans
Member
*
Posts: 9


« Reply #8 on: July 31, 2012, 08:42:40 am »

Hello! How to ru-localize VLocity (64 bit)?
I changed settings in / etc/profile.d/for lang.csh and lang.sh:
>before
export LANG=en_EN
>after
export LANG=ru_RU.utf8
It is necessary to change something else? Or it is enough?
(Не знаю, что имел в виду под локализацией консоли топикстартер, но во всяком случае у меня русский шрифт в ней и, в частности, в mc, отображается корректно). Может еще что-то надо?
« Last Edit: July 31, 2012, 12:43:38 pm by Gans » Logged
borgio3
Member
*
Posts: 14


« Reply #9 on: August 06, 2012, 11:48:21 am »

To all italian users:
When you are going to edit /etc/profile.d/lang.sh be sure that you add .UTF-8 because if you don't do that, the wall system will be unstable, as i experienced today. At the end you must ahve this code:
Code:
language = it_IT.UTF-8

Ciao :-)
Logged
furydragon
Member
*
Posts: 26


« Reply #10 on: August 29, 2012, 12:18:31 pm »

1) I'm now thinking about testing 64 bit systems on my computer and couldn't check behavior of such systems right now (I couldn't start 64bit guest system in VirualBox under 32bit host system). On my mind localization of VLocity is similar to 32bit VL.
2) About "console". I described localization of text mode of system (I'm talking about runlevel 2, don't mix up with terminal on your desktop environment).
3) Different programs has different settings in system, but most of them read environment variables. I described default terminal emulator for KDE and XFCE, although such terminal emulator as xterm has own setting file in system.
4) Topic was started many days ago and now I work with UTF locale. Wait for new instructions. It will be soon.
Logged
Gans
Member
*
Posts: 9


« Reply #11 on: August 30, 2012, 10:54:21 am »

OK. It's good news  Smiley
Logged
furydragon
Member
*
Posts: 26


« Reply #12 on: September 07, 2012, 06:36:13 am »

In VLocity you can only change locale for GUI and have an english locale for text mode. It works fine.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!