How to Add a Locale in Linux Mint

In this article, we'll see how to add a new locale in Linux Mint. Installing a locale will allow you to see messages translated in your native language and translate the user interface of the operating system. Locale allows you to change the currency and address formats. Let's see how it can be done.

Let's see which locales are installed by default. Open your favorite Terminal application and type or paste the following command.

locale -a

This will populate the list of installed locales. This is how it looks.

Linux Mint List Of Locales

Next, you need to find the exact name of the locale you are going to add. Refer to the list of supported locales, which can be obtained with the following command.

less /usr/share/i18n/SUPPORTED

Linux Mint List Of Supported Locales

The command produced the long list of supported locales.

Linux Mint List Of Supported Locales 2

Find the desired locale in the list. For example, I will add the anp_IN UTF-8.

To add a locale in Linux Mint, do the following.

  1. Open a new root terminal. Please refer to the following article:

    How to Open Root Terminal in Linux Mint

  2. Type the following command:
    echo anp_IN UTF-8>> /var/lib/locales/supported.d/mylocale

    This will create a file named "mylocale" in the folder /var/lib/locales/supported.d/. If the file already exists, a new line will be added to the end of the file.
    Linux Mint Add A Locale
    Replace the locale name with the required one.

  3. Execute the command locale-gen to generate locales.Linux Mint Locale Added

Now you can close the root terminal. Check the output of locale -a to see which locales you have now installed.Linux Mint New Locale List

Tip: Linux Mint comes with a number of extra locales installed. See how to get rid of them in the article How to Remove Locale in Linux Mint.


Leave a Reply

Your email address will not be published. Required fields are marked *