Locale en_RU is English language locale for Russia. Locale en_RU has been developed and tested in Fedora and will likely work in other GNU/Linux distros based on glibc. There are prebult RPM packages for a few versions of Fedora (as well as for RHEL/CentOS, OpenSuse and Mageia), source tarball for configure && make && make install
is also available. Locale en_RU is free software.
This document describes Locale en_RU version 0.5.5-0.vdb.3 released on 2020-10-28.
Locale is a set of parameters that defines language- and country-specific preferences like number formats, date and time formats, currency symbol, paper size, etc.
Locale name consists of four parts:
language
_
territory.
codeset@
modifier
Nowadays UTF-8 encoding is a de-facto standard, so codeset is usually utf8
(or UTF-8
). modifier is often omitted, so typical locale name looks like:
en_US.utf8
— English language (en
) locale for the USA (US
),de_CH.utf8
— German language (de
) locale for Switzerland (CH
), orru_RU.utf8
— Russian language (ru
) locale for Russia (RU
).Usually a GNU/Linux system is equipped with a large set of predefined locales. Fedora 19 has 789 predefined locales (Fedora 28 has 819). Technically, locales are part of glibc, a core system library.
As a part of glibc, locales may affect any application, either console or GUI, which uses glibc. Since glibc is used by a great majority of GNU/Linux applications, locales may affect almost all applications.
Locales may have effect, but may not, because application should use locale. If an application is not locale-aware, locales will not affect it. Nowadays most of the applications are locale-aware.
Locale en_RU is a custom locale. Custom means it is not a part of glibc package. However, being installed from RPM package it becomes a fully functional first-class citizen of system locale family.
As you can deduce from its name, en_RU is English language (en
) locale for Russia (RU
). What does it mean? Look:
$ export LANG=en_RU.utf8
$ date +%c
Wed 05 Nov 2014 18:00:00 MSK # Note 24-hour clock.
$ cal
November 2014
Mo Tu We Th Fr Sa Su # Week starts on Monday.
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
$ printf "%'0.2f\n" 1000000
1 000 000.00 # Thousand separator is space.
See section What exactly? for detailed description of en_RU locale parameters.
Nowadays the great majority of people use computers every day, either at work or home. They are not computer professionals (programmers or system administrators), they are just end users. They may know English language or may not. Programs for end users are usually internationalized and localized to let users talk with computers using their mother tongue. That’s generally right approach, but there are old fogeys who still prefer English for user interface because English commands and messages are shorter than Russian counterparts, localizations are incomplete or outdated, or just because it is a very old habit.
However, using locale en_US (English for the USA) or other predefined locales like en_GB (English for Great Britain) or en_CA (English for Canada) has noticeable drawbacks: ridiculous 12-hour clock (anybody knows if 12pm is noon or midnight? 12am?), confusing (at least for Russians) mm/dd/yyyy
date format, ugly imperial units, etc.
Trick with combining locales by setting environment variables LANG
and LC_MESSAGES
does not play well to me:
$ export LANG=ru_RU.utf8
$ export LC_MESSAGES=en_US.utf8
$ date +%c
Ср 05 ноя 2014 18:01:43 # Note Russian weekday and month names.
$ cal
Ноябрь 2014 # Again.
Пн Вт Ср Чт Пт Сб Вс
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
$ printf "%'0.2f\n" 1000000
1 000 000,00 # Decimal mark is comma.
Thus, I prefer to use English language, but I want to have 24-hour clock, Monday as the first day of a week and metric units. In other words, I need locale en_RU.
Simple Google search1 shows I am not the only inventor of the locale, and not the first of inventors. However, the search also shows the idea of such a locale visited many heads. From time to time different people asked for such a locale:
…or provided instructions how to set up it:
The most noticeable attempt to the problem was made by Kirill A. Korinskiy in 2009: he submitted a proposal of a new locale to glibc Bugzilla. However, glibc maintainer Ulrich Drepper rejected it, he said people interested in the new locale can compile it themselves.
There are instructions how to set up locale en_RU, why did I create one more locale? Well, I did it because:
This incarnation of locale en_RU is not a plain locale source and/or instruction how to compile and install it but an RPM package with the following advantages:
Note: Installing the locale does not have immediate visible effect. To see the locale in action, you have to use it.
The easiest way to install Locale en_RU is using prebuilt RPM package. Enable my repository first, then:
Download Locale en_RU source tarball:
$ wget https://sourceforge.net/projects/en-ru/files/0.5.5/locale-en_RU-0.5.5.tar.gz
unpack it:
$ tar xaf locale-en_RU-0.5.5.tar.gz
$ cd locale-en_RU-0.5.5
then follow instructions in INSTALL.en.md.
Just set environment variable LANG
to en_RU.utf8
before running desired application, e. g.:
$ LANG=en_RU.utf8 gedit
This works for both console and GUI applications.
Note: Make sure there are no LC_*
environment variables (e. g. LC_ALL
, LC_MESSAGES
, LC_TIME
, etc), because they have priority over LANG
. To check if there are any LC_*
environment variables run:
$ printenv | grep ^LC_
Output should be empty. If it is not, unset all the variables:
$ unset `printenv | grep ^LC_ | cut -f1 -d=`
Set environment variable LANG
to value en_RU.utf8
in your profile script.
If your login shell is bash, make sure ~/.bash_profile
file includes line:
export LANG=en_RU.utf8
or two:
LANG=en_RU.utf8
export LANG
In case of other shells, name of your profile script and assignment syntax may vary.
Changes in profile will have effect at your next login.
Setting default locale depends on your graphical desktop environment (e. g. Gnome, KDE, etc). It could be either special GUI application (named Settings, Preferences, or Control Center), or a kind of configuration file.
Settings → Region & Language; set Language to English (Russian Federation), and Formats to Russian Federation (English). Change will be applied the next time you log in.
Note: I do not recommend changing the system default locale, as this may affect the operation of sytem services. Setting the user default locale as described above is sufficient to meet the user’s needs.
In modern systemd-based GNU/Linux distros system-wide default locale is controlled by localectl
program. Run
$ localectl status
to see current system locale, and
$ localectl set-locale LANG=en_RU.utf8
to change it to locale en_RU.
This command may be executed from non-root account. If so, user will be prompted for root password.
Changing the system locale does not have immediate effect. New locale will be used by system services at the next system boot. User may notice new locale at the next login.
Note: System default locale is often overridden by user’s personal settings, especially in graphic sessions.
Locale en_RU consistently sticks to English language, but fixes other parameters which look ugly for Russians:
date +%r
prints 13:01:28
.mm/dd/yyyy
to unambiguous ISO 8601 format yyyy-mm-dd
. It is not (yet?) widely used in Russia, but I believe advocating this format is a right thing to do.U+202F
)3, but decimal mark is still point, for example: 1 000 000.000
. Such a style fully conforms to general rules for writing values of International System of Units and allowed in Russia.₽
” (U+20BD
)4, see Russian ruble.RUB
”, accordingly to ISO 4217.900.00 руб.
, 60.00 RUB
.RU
.RUS
.643
.7
.810
.A4
.glibc-locale-en_RU-0.001-1
prevents ugrading it. You will need uninstall it first, then install another version.If you found a bug of any sort (including a typo or mistake in supporting documentation and/or website) or have a request, please submit a ticket. Questions and discussions are welcome at forums. Feel free to post a review and rate the project.
Note: Sorry, anonymous posts are not allowed. You have to register at SourceForge to get write permissions.
If registration at SourceForge is not feasible to you, send an email directly to author: mailto:van.de.bugger@gmail.com.
Donations are not requested. Just post a review and rate the project at SourceForge.
My repository contains my software (and some 3rd-party software built and packaged by me). Packages are built for few versions of Fedora (as well as for RHEL/CentOS, OpenSuse and Mageia).
The repository is made to meet my own needs; I work in Fedora, so Fedora packages should work. Packages for other distros are built with no testing5 — sorry, I have no capacity to check dozen of platforms. If something goes wrong, feel free to report a bug.
To enable my repository in modern distros (i. e. starting from Fedora 22) run two commands:
$ sudo dnf install dnf-plugins-core
$ sudo dnf copr enable vandebugger/release
In older distros (e. g. in Fedora 21, RHEL 7):
$ sudo install yum-plugin-copr
$ sudo copr enable vandebugger/release
Copyright © 2013—2014, 2016—2020 Van de Bugger.
Locale en_RU is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Locale en_RU is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Locale en_RU. If not, see http://gnu.org/licenses/gpl.html.
Google search results may depend on the searching history, so results your see may vary.↩︎
Width of narrow no-break space depends on the font. In monospaced font all the glyphs should have the same width and so narrow no-break space has the same width as normal space. In proportional font narrow no-break space may be really narrow.↩︎
Actually, this is an option. If glibc does not support ruble sign (it was introduced in glibc version 2.22), generic currency sign (“¤
”, U+00A4) can be used instead.↩︎
Building an RPM package ivolves running some locale tests, but the RPM itself is not tested.↩︎