Chapter 10. Changing Language and Country Settings with YaST

Contents

10.1. Changing the System Language
10.2. Changing the Country and Time Settings

Working in different countries or having to work in a multilingual environment requires your computer to be set up to support this. openSUSE® can handle different locales in parallel. A locale is a set of parameters that defines the language and country settings reflected in the user interface.

The main system language was selected during installation and keyboard and time zone settings were adjusted. However, you can install additional languages on your system and determine which of the installed languages should be the default.

For those tasks, use the YaST language module as described in Section 10.1, “Changing the System Language”. Install secondary languages to get optional localizations if you need to start applications or desktops in languages other than the primary one.

Apart from that, the YaST timezone module allows you to adjust your country and timezone settings accordingly. It also lets you synchronize your system clock against a time server. For details, refer to Section 10.2, “Changing the Country and Time Settings”.

10.1. Changing the System Language

Depending on how you use your desktop and whether you want to switch the entire system to another language or just the desktop environment itself, there are several ways to achieve this:

Changing the System Language Globally

Proceed as described in Section 10.1.1, “Modifying System Languages with YaST” and Section 10.1.2, “Switching the Default System Language” to install additional localized packages with YaST and to set the default language. Changes are effective after relogin. To ensure that the entire system reflects the change, reboot the system or close and restart all running services, applications, and programs.

Changing the Language for the Desktop Only

Provided you have previously installed the desired language packages for your desktop environment with YaST as described below, you can switch the language of your desktop using the desktop's control center. After the X server has been restarted, your entire desktop reflects your new choice of language. Applications not belonging to your desktop framework are not affected by this change and may still appear in the language that was set in YaST.

Temporarily Switching Languages for One Application Only

You can also run a single application in another language (that has already been installed with YaST). To do so, start it from the command line by specifying the language code as described in Section 10.1.3, “Switching Languages for Individual Applications”.

10.1.1. Modifying System Languages with YaST

YaST knows two different language categories:

Primary Language

The primary language set in YaST applies to the entire system, including YaST and the desktop environment. This language is used whenever available unless you manually specify another language.

Secondary Languages

Install secondary languages to make your system multilingual. Languages installed as secondary languages can be selected manually for a specific situation. For example, use a secondary language to start an application in a certain language in order to do word processing in this language.

Before installing additional languages, determine which of them should be the default system language (primary language) after you have installed them.

To access the YaST language module, start YaST and click System+Language. Alternatively, start the Languages dialog directly by running yast2 language as user root from a command line.

Procedure 10.1. Installing Additional Languages

When installing additional languages, YaST also allows you to set different locale settings for the user root, see Step 4. The option Locale Settings for User root determines how the locale variables (LC_*) in the file /etc/sysconfig/language are set for root. You can either set them to the same locale as for normal users, keep it unaffected by any language changes or only set the variable RC_LC_CTYPE to the same values as for the normal users. This variable sets the localization for language-specific function calls.

  1. To add additional languages in the YaST language module, select the Secondary Languages you wish to install.

  2. To make a language the default language, set it as Primary Language.

  3. Additionally, adapt the keyboard to the new primary language and adjust the time zone, if appropriate.

    [Tip]

    For advanced keyboard or time zone settings, select Hardware+ Keyboard Layout or System+Date and Time in YaST to start the respective dialogs. For more information, refer to Section 10.2, “Changing the Country and Time Settings”.

  4. To change language settings specific to the user root, click Details.

    1. Set Locale Settings for User root to the desired value. For more information, click Help.

    2. Decide if you want to Use UTF-8 Encoding for root or not.

  5. If your locale was not included in the list of primary languages available, try specifying it with Detailed Locale Setting. However, some of these localizations may be incomplete.

  6. Confirm your changes in the dialogs with OK. If you have selected secondary languages, YaST installs the localized software packages for the additional languages.

The system is now multilingual. However, to start an application in a language other than the primary one, you need to set the desired language explicitly as explained in Section 10.1.3, “Switching Languages for Individual Applications”.

10.1.2. Switching the Default System Language

  1. To globally switch the default system language, start the YaST language module.

  2. Select the desired new system language as Primary Language.

    [Important]Deleting Former System Languages

    If you switch to a different primary language, the localized software packages for the former primary language will be removed from the system. If you want to switch the default system language but want to keep the former primary language as additional language, add it as Secondary Language by enabling the respective checkbox.

  3. Adjust the keyboard and time zone options as desired.

  4. Confirm your changes with OK.

  5. After YaST has applied the changes, restart any X sessions (for example, by logging out and logging in again) to make YaST and the desktop applications reflect your new language settings.

10.1.3. Switching Languages for Individual Applications

After you have installed the respective language with YaST, you can run a single application in another language.

Standard X and GNOME Applications

Start the application from the command line by using the following command:

LANG=language application

For example, to start f-spot in German, run LANG=de_DE f-spot. For other languages, use the appropriate language code. Get a list of all language codes available with the locale -av command.

KDE Applications

Start the application from the command line by using the following command:

KDE_LANG=language application

For example, to start digiKam in German, run KDE_LANG=de digikam. For other languages, use the appropriate language code.

10.2. Changing the Country and Time Settings

Using the YaST date and time module, adjust your system date, clock and time zone information to the area you are working in. To access the YaST module, start YaST and click System+Date and Time. Alternatively, start the Clock and Time Zone dialog directly by running yast2 timezone & as user root from a command line.

First, select a general region, such as Europe. Choose an appropriate country that matches the one you are working in, for example, Germany.

Depending on which operating systems run on your workstation, adjust the hardware clock settings accordingly:

  • If you run another operating system on your machine, such as Microsoft Windows*, it is likely your system does not use UTC, but local time. In this case, uncheck Hardware Clock Set To UTC.

  • If you only run Linux on your machine, set the hardware clock to UTC and have the switch form standard time to daylight saving time performed automatically.

You can change the date and time manually or opt for synchronizing your machine against an NTP server, either permanently or just for adjusting your hardware clock.

Procedure 10.2. Manually Adjusting Time and Date

  1. In the YaST timezone module, click Change to set date and time.

  2. Select Manually and enter date and time values.

  3. Confirm your changes with Accept.

Procedure 10.3. Setting Date and Time With NTP Server

  1. Click Change to set date and time.

  2. Select Synchronize with NTP Server.

  3. Enter the address of an NTP server, if not already populated.

  4. Click Synchronize Now, to get your system time set correctly.

  5. If you want to make use of NTP permanently, enable Save NTP Configuration.

  6. With the Configure button, you can open the advanced NTP configuration. For details, see Section 27.1, “Configuring an NTP Client with YaST”.

  7. Confirm your changes with Accept.