INRI SakiZ's picture

Hello for all)))

How to change default locale (en_GB ISO????) to another for example to ru_RU UTF8 or en_US UTF8??

Sorry for my english)))

Forum: 
Tags: 
INRI SakiZ's picture

Instead ru_RU.UTF-8 you can use any other encoding which are listed here
Вместо ru_RU.UTF-8 можно использовать любую другую кодировку, которые перечислены здесь
http://www.elxis.org/guides/developers-guides/elxis-languages-locales-li...

Редактируем файл /etc/environment
(Edit the file "/etc/environment")

nano /etc/environment

Вот как должен выглядеть вывод команды в «правильной» системе:
(Here's how to look at the output of the "correct" system:)

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANGUAGE="ru_RU.UTF-8"
LANG="ru_RU.UTF-8"
LC_ALL="ru_RU.UTF-8"
LC_MESSAGES="ru_RU.UTF-8"


Генерим русскую и английскую UTF-8 локали (Generating Russian & English UTF-8 Locales)
locale-gen ru_RU.utf8 && locale-gen en_US.utf8

Переконфигурируем локали (Reconfiguring locales)
dpkg-reconfigure locales

Определяем дефолтную локаль (Determine the default locale)
localedef ru_RU.UTF-8 -i ru_RU -f UTF-8

Для того, чтобы удалить из системы ненужные локали, заходим в папку
(In order to uninstall unneeded locale, go to the folder)

cd /var/lib/locales/supported.d
и правим, соответственно файлики en, ru и local.
(and edit respectively files en, ru, and local.)

echo "ru_RU.UTF-8 UTF-8" > ru
echo "en_US.UTF-8 UTF-8" > en
echo "ru_RU.UTF-8 UTF-8" > local

Перезагружаемся )) (Reboot)))
reboot


Jeremy Davis's picture

[update - You beat me to it! :)]

And I haven't tried to change it. I had a bit of a search about and found lots of conflicting information so I'm not sure what to suggest, other than perhaps you too can have a search and test some stuff out until you get something that works. If you keep in mind, TKL v11.x is based on Ubuntu 10.04/Lucid then you will find plenty of info (although as I said, a lot of it seems to be conflicting).

For started you need to have the language you want installed. Have a look at the available ones here. Then install with apt like this:

apt-get update && apt-get install language-pack-xx

(where xx is the language code).

Then from what I gather you need set the language varilables.

Here is a bit of reading, although google and testing will probably be your best bet:
https://help.ubuntu.com/community/Locale
https://help.ubuntu.com/community/EnvironmentVariables#Locale_setting_va...

Here's a few threads that look like they may be useful:
http://ubuntuforums.org/showthread.php?t=1535865
http://ubuntuforums.org/showthread.php?t=1471876
http://serverfault.com/questions/228474/correctly-changing-default-local...
http://ubuntuforums.org/showthread.php?t=1489406

Bottom line is that it would be great if you could have a read and a play with and see if you can get it to work and post back with your findings.

Thanks

Chris Musty's picture

In the above scenario, why not just run

dpkg-reconfigure locales

and chose the required locale

Chris Musty

Director

Specialised Technologies

Add new comment