Change language on alt linux

How to Change or Set System Locales in Linux

A locale is a set of environmental variables that defines the language, country, and character encoding settings (or any other special variant preferences) for your applications and shell session on a Linux system. These environmental variables are used by system libraries and locale-aware applications on the system.

Locale affects things such as the time/date format, the first day of the week, numbers, currency and many other values formatted in accordance with the language or region/country you set on a Linux system.

In this article, we will show how to view your currently installed system locale and how to set system’s locale in Linux.

How to View System Locale in Linux

To view information about the current installed locale, use the locale or localectl utility.

$ locale LANG=en_US.UTF-8 LANGUAGE=en_US LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= $ localectl status System Locale: LANG=en_US.UTF-8 LANGUAGE=en_US VC Keymap: n/a X11 Layout: us X11 Model: pc105

You can view more information about an environmental variable, for example LC_TIME, which stores the time and date format.

$ locale -k LC_TIME abday="Sun;Mon;Tue;Wed;Thu;Fri;Sat" day="Sunday;Monday;Tuesday;Wednesday;Thursday;Friday;Saturday" abmon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec" mon="January;February;March;April;May;June;July;August;September;October;November;December" am_pm="AM;PM" d_t_fmt="%a %d %b %Y %r %Z" d_fmt="%m/%d/%Y" t_fmt="%r" t_fmt_ampm="%I:%M:%S %p" era= era_year="" era_d_fmt="" alt_digits= era_d_t_fmt="" era_t_fmt="" time-era-num-entries=0 time-era-entries="S" week-ndays=7 week-1stday=19971130 week-1stweek=1 first_weekday=1 first_workday=2 cal_direction=1 timezone="" date_fmt="%a %b %e %H:%M:%S %Z %Y" time-codeset="UTF-8" alt_mon="January;February;March;April;May;June;July;August;September;October;November;December" ab_alt_mon="Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec"

To display a list of all available locales use the following command.

$ locale -a C C.UTF-8 en_US.utf8 POSIX

How to Set System Locale in Linux

If you want to change or set system local, use the update-locale program. The LANG variable allows you to set the locale for the entire system.

The following command sets LANG to en_IN.UTF-8 and removes definitions for LANGUAGE.

$ sudo update-locale LANG=LANG=en_IN.UTF-8 LANGUAGE OR $ sudo localectl set-locale LANG=en_IN.UTF-8

To configure a specific locale parameter, edit the appropriate variable. For instance.

$ sudo update-locale LC_TIME=en_IN.UTF-8 OR $ sudo localectl set-locale LC_TIME=en_IN.UTF-8

You can find global locale settings in the following files:

  • /etc/default/locale – on Ubuntu/Debian
  • /etc/locale.conf – on CentOS/RHEL
Читайте также:  Команда wget в линукс

These files can also be edited manually using any of your favorite command line editors such as Vim or Nano, to configure your system locale.

To set a global locale for single user, you can simply open ~/.bash_profile file and add the following lines.

LANG="en_IN.utf8" export LANG

For more information, see the locale, update-locale and localectl man pages.

$ man locale $ man update-locale $ man localectl

That’s all! In this short article, we have explained how to view and set system local in Linux. If you have any questions, use the feedback form below to reach us.

Источник

unixforum.org

консоль
рут
locale
LANG=ru_RU.UTF-8
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=
cat /etc/sysconfig/keyboard
KEYBOARDTYPE=»pc»
KEYTABLE=»us-acentos»
cat ~/.i18n
cat: /root/.i18n: No such file or directory

Re: Локализация AltLinux как ?

Сообщение wRAR » 17.02.2006 11:19

Re: Локализация AltLinux как ?

Сообщение ZloiJoker » 17.02.2006 13:56

Re: Локализация AltLinux как ?

Сообщение wRAR » 17.02.2006 20:16

wrar@wrars-comp ~ $ su
Password:
root@wrars-comp ~ # locale
LANG=ru_RU.CP1251
LC_CTYPE=»ru_RU.CP1251″
LC_NUMERIC=»ru_RU.CP1251″
LC_TIME=»ru_RU.CP1251″
LC_COLLATE=»ru_RU.CP1251″
LC_MONETARY=»ru_RU.CP1251″
LC_MESSAGES=»ru_RU.CP1251″
LC_PAPER=»ru_RU.CP1251″
LC_NAME=»ru_RU.CP1251″
LC_ADDRESS=»ru_RU.CP1251″
LC_TELEPHONE=»ru_RU.CP1251″
LC_MEASUREMENT=»ru_RU.CP1251″
LC_IDENTIFICATION=»ru_RU.CP1251″
LC_ALL=
root@wrars-comp ~ #
wrar@wrars-comp ~ $ su —
Password:
root@wrars-comp ~ # locale
LANG=POSIX
LC_CTYPE=»POSIX»
LC_NUMERIC=»POSIX»
LC_TIME=»POSIX»
LC_COLLATE=»POSIX»
LC_MONETARY=»POSIX»
LC_MESSAGES=»POSIX»
LC_PAPER=»POSIX»
LC_NAME=»POSIX»
LC_ADDRESS=»POSIX»
LC_TELEPHONE=»POSIX»
LC_MEASUREMENT=»POSIX»
LC_IDENTIFICATION=»POSIX»
LC_ALL=

Отсюда вывод: вы используете su без минуса.

Re: Локализация AltLinux как ?

Сообщение ZloiJoker » 18.02.2006 20:26

всетаки тут дело не в минусе а в настройках локализации:
joker]# locale
LANG=ru_RU.UTF-8
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=

ls -als
п╦я┌п╬пЁп╬ 80
8 drwx—— 3 joker joker 4096 пєп╣п╡ 2 10:46 .
8 drwxr-xr-x 6 root root 4096 пєп╣п╡ 2 10:44 ..

[root]# locale
LANG=ru_RU.UTF-8
LC_CTYPE=»ru_RU.UTF-8″
LC_NUMERIC=»ru_RU.UTF-8″
LC_TIME=»ru_RU.UTF-8″
LC_COLLATE=»ru_RU.UTF-8″
LC_MONETARY=»ru_RU.UTF-8″
LC_MESSAGES=»ru_RU.UTF-8″
LC_PAPER=»ru_RU.UTF-8″
LC_NAME=»ru_RU.UTF-8″
LC_ADDRESS=»ru_RU.UTF-8″
LC_TELEPHONE=»ru_RU.UTF-8″
LC_MEASUREMENT=»ru_RU.UTF-8″
LC_IDENTIFICATION=»ru_RU.UTF-8″
LC_ALL=
[root]# ls -als
п╦я┌п╬пЁп╬ 352
8 drwxr-x— 16 root root 4096 п╞пҐп╡ 9 18:12 .

Источник

Как поменять язык Linux без переустановки системы

При установке Linux можно выбрать язык системы (локаль) — и в дальнейшем этот язык будет использоваться в программах и окнах Linux (за исключением тех приложений, для которых не сделан перевод).

Если вы решили поменять язык Linux, то вам не нужно переустанавливать её — достаточно выполнить простые действия.

Чтобы узнать текущие языковые настройки, наберите команду:

Чтобы посмотреть доступные языковые настройки (локали), воспользуйтесь командой

Для изменения языка системы, нужно, чтобы локаль, на которую вы хотите поменять язык, уже присутствовала в системе. Если её нет, то нужно добавить.

Чтобы добавить новую локаль, откройте файл /etc/locale.gen:

Читайте также:  Tl wn822n arch linux

И раскомментируйте там строки с желаемыми новыми локалями. Затем выполните команду:

Теперь новые языковые настройки (новую локаль) вы можете видеть в списке доступных локалей.


Смена локали для текущий сессии

Чтобы поменять язык и кодировку для текущей сессии, вам нужно установить переменную окружения LANG, это можно сделать командой export:

# Установить английскую локаль export LANG=en_US.UTF-8 # Установить русскую локаль export LANG=ru_RU.UTF-8 # Установить французскую локаль export LANG=fr_FR.UTF-8

Если в вашей системе это не сработало, то замените переменную LANG на переменную LANGUAGE, например:

Изменение языковых настроек насовсем для одного пользователя

Добавьте строку с экспортом желаемой локали (например, export LANG=en_US.utf-8) в файл ~/.bashrc

Изменения начнут действовать после выхода/входа и будут действовать после каждой перезагрузки.

Изменение системной локали по умолчанию

Есть два альтернативных метода смены локали.

Первый — это запустить следующую команду (укажите нужную вам локаль):

sudo localectl set-locale LANG=en_US.UTF-8
sudo localectl set-locale LANG=ru_RU.UTF-8

Второй метод — прописать язык в файле /etc/locale.conf, откройте его:

и добавьте туда строку с нужной локалью:

После перезагрузки система предложит изменить имена папок на локализованные:

Чтобы это окно не появлялось при каждой загрузке системы, поставьте галочку «Не задавать больше этот вопрос».

Чтобы вновь открыть это окно, выполните в командной строке:

echo 'en_US' > ~/.config/user-dirs.locale xdg-user-dirs-gtk-update

Источник

How to switch language keyboard combination?

I would like to type Hebrew in Ubuntu. I tried downloading the Hebrew language pack and then setting alt — shift as my layout-change shortcut in the Options section of «Keyboard Layout». However, when I actually press alt — shift , nothing happens. How can I switch my keyboard layout to Hebrew?

When selecting keyboard key combination to change languages, some combinations do not work (both Alt did not work for me). I am using Shift+Ctrl with no problem.

9 Answers 9

Ubuntu 17.10 and newer (GNOME Shell)

From this answer: After adding the desired languages (by navigating to Settings -> Regional & Language), you can use the default keyboard shortcut which is Super + Space («super» is another name for the Windows key), or you can click on the top bar menu:

screenshot

Ubuntu 13.10 to 17.04 (Unity)

As of Ubuntu 13.10, it is now called Text Entry Settings instead of Keyboard Layout

It can be reached through either of these methods

  1. Going through System Settings -> Text Entry
  2. Using the App Indicator as shown in the screen-shot below.

App Indicator icon

Ubuntu 13.04 and older

Seems you forgot an important step.

  1. Download Hebrew language support. You can do this from the Install/Remove Languages section of «Language Support».
  2. System Settings -> Keyboard Layout -> «+» -> «Hebrew» -> Add
  3. System Settings -> Keyboard Layout -> Options -> Keys to Change Layout -> mark [alt]+[shift] (this step is optional, only if you want that custom keyboard shortcut)
Читайте также:  Linux terminal make file

An icon like this should appear in the upper-right after step two:

The keyboard indicator

To switch keyboard layout on Ubuntu 12.04

  1. Go to System Settings.
  2. Under Keyboard Layout — click on Options.enter image description here
  3. Under Key(s) to change layout — choose the combination of keys you would like to use. enter image description here

When I set the key combination, and then press it, it doesn’t do anything. I can however change the layout by my mouse in the applet, that works perfectly.

This is now only available in gnome-tweaks (tweaks) and it is now in «Keyboard & Mouse» -> «Additional Layout Options» -> «Switching to another layout» section (at least it was like this in 20.04 and now in 22.04)

In Ubuntu 12.04 LTS,

snap5

Goto the Keyboard Layout Options window I could select Key(s) to change layout and mark the binding of my choice. I use Shift + CapsLock to toggle the layout from the keyboard itself without having to use mouse cursor to select the required layout from the panel indicator. The same key combo seemed to work to serf through or select between multiple layouts. (But in Ubuntu 13.10 it wasn’t so easy.)

In Ubuntu 13.10,

Goto the Keyboard settings window, under Shortcuts tab, I select Typing. The default for Switch to next source is Super + SPACE which didn’t seem be working for me and so by clicking on it and I assigned a New Accelerator. , to change to next Layout (I used Super + L ).

saucy1

(Then I assigned something similar for Switch to previous source using the same preferred layout, and then began to test them. Switching from the preferred layout to the alternate worked but the reverse did not. Please refer the next step for the fix.)

The Fix: After assigning Super + L for «Switch to next source» using my preferred layout (A), I changed my keyboard layout to the alternative layout (B) and then assigned the combination to «Switch to previous source» (for which I used Shift + Super + L ). Then I tested them, and they work fine. (Maybe disabling «Switch to previous source» would work too.)

saucy2

The new accelerators for the key combos that I used looks like this:

I could then switch to layout (A) using Super + L and back to layout (B) using Shift + Super + L .

Источник

Оцените статью
Adblock
detector