5

I am using Linux Mint 15

Currently I have my locale as (by using command locale):

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=ar_SA.UTF-8
LC_TIME=ar_SA.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=ar_SA.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=ar_SA.UTF-8
LC_NAME=ar_SA.UTF-8
LC_ADDRESS=ar_SA.UTF-8
LC_TELEPHONE=ar_SA.UTF-8
LC_MEASUREMENT=ar_SA.UTF-8
LC_IDENTIFICATION=ar_SA.UTF-8
LC_ALL=

I want to change ar_SA.UTF-8 to en_IN.UTF-8. How do i achieve this? Which file shold I be editing? Cant seem to find any locale file other than /etc/locale.alias

9

Your Locale

You have a mix of several locales, at least en_US and ar_SA. These actually come from environment variables (the names of which locale is displaying for you).

If these are only for your user, they may be coming from a setting in your desktop environment. Go into settings and look for language and/or locale settings. There may also be a language selector on the login screen.

System Default Locale

On Debian-like systems, the system default locale is stored in /etc/default/locale. Not all locales are necessarily available (generated), however; if the locales-all package isn't installed, the generation is controlled by /etc/locale.gen. You can edit both by hand (they're simple text files).

If you decide to edit the files by hand, you'll need to run locale-gen to generate any new locales you enabled.

The alternative is to run:

dpkg-reconfigure locales

That should prompt you which locales to generate and which you want as the system default.

Note that it'll give you a simple locale as default (everything will be en_IN.UTF-8). That may be fine; I suspect you can read en_IN messages almost as well as en_US ones. (With only slight annoyances about colour, etc.). If you want to generate a more complicated set up, you can edit /etc/default/locale by hand or by using update-locale.

You'll need to log out and back in for the new locale settings to take effect.

  • edited /etc/default/locale and yup its working – Stormvirux Mar 1 '14 at 6:33
-1

You change all the LC_... settings by setting LC_ALL

$ locale
LANG="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL=
$ export LC_ALL=uk_UA
$ locale
LANG="en_US.UTF-8"
LC_COLLATE="uk_UA"
LC_CTYPE="uk_UA"
LC_MESSAGES="uk_UA"
LC_MONETARY="uk_UA"
LC_NUMERIC="uk_UA"
LC_TIME="uk_UA"
LC_ALL="uk_UA"

locale -a will show all the locales installed on your system

  • 2
    For the record, this is a terrible idea. LC_ALL should not be exported, it should only be used for temporary overrides. – HalosGhost Oct 3 '14 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.