<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" 
        "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [

<!-- for translations, change lang to appropriate code -->
<!ENTITY language "en">
]>

<!-- =============Document Header ============================= -->
<article id="index" lang="&language;">

<articleinfo> 
	<title>Language Support Help</title>

	<authorgroup>

		<author> 
		  <firstname>Gunnar</firstname>
		  <surname>Hjalmarsson</surname>
		  <affiliation>
			<orgname>Ubuntu Documentation Contributors team</orgname>
			<address> <email>gunnarhj@ubuntu.com</email> </address>
		  </affiliation>
		</author>

<!--		This is appropriate place for other contributors: translators,
		maintainers,  etc. -->

<!--		<othercredit role="translator">
		  <firstname>Latin</firstname>
		  <surname>Translator 1</surname>
		  <affiliation>
			<orgname>Latin Translation Team</orgname>
			<address> <email>translator@gnome.org</email> </address>
		  </affiliation>
		  <contrib>Latin translation</contrib>
		</othercredit> -->

	</authorgroup>

	<legalnotice>
		<title>License</title>

		  <para>This document is made available under the Creative Commons ShareAlike 2.5 License (CC-BY-SA).</para>

		  <para>You are free to modify, extend, and improve the Ubuntu documentation source code under the terms of this license. All derivative works must be released under this license.</para>

		  <para>This documentation 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 AS DESCRIBED IN THE DISCLAIMER.</para>

	</legalnotice>

	<copyright>
		<year>2011-2021</year>
		<holder>Canonical Ltd.</holder>
	</copyright>

</articleinfo>

<!-- ============== Document Body ============================= -->

<tip>

	<para>If you look for specific context help, you may want to go directly to the <application>Language Support</application> section of this document.</para>

</tip>

<!-- ============== Introduction ============================== -->

<sect1 id="introduction">
	<title>Introduction</title>

	<para>While English is the original language, Ubuntu has been translated to a large number of languages, and the translations are updated continuously by the community of translation teams around the world. As a result, most Ubuntu users can have menus and windows be displayed in their language of choice.</para>

	<para>However, messages are not always displayed in the preferred language, since not all messages have been translated into all the available languages at each point of time.</para>

	<sect2 id="priority-list">
		<title>Language priority list</title>

		<para>Ubuntu uses the <application><ulink url="https://www.gnu.org/software/gettext/gettext.html">GNU gettext</ulink></application> technology to deal with languages and related matters. One GNU specific feature is the <emphasis>language priority list</emphasis>, which lets you set more than one language in your order of preference. As an example, this is what the list of a German user might look like:</para>

		<itemizedlist>
		  <listitem><para>German</para></listitem>
		  <listitem><para>Spanish (Spain)</para></listitem>
		  <listitem><para>English</para></listitem>
		</itemizedlist>

		<para>If there is no German translation of a message, GNU compatible applications will try Spanish, and if no Spanish translation of the message is available either, it will be displayed in English.</para>

		<para>English is always the last item in the list. Thus setting fallback language(s) makes a difference if:</para>

		<orderedlist>
		  <listitem><para>a non-English language is your first choice,</para></listitem>
		  <listitem><para>the translations into that language are not complete, and</para></listitem>
		  <listitem><para>you prefer one or more non-English fallback languages.</para></listitem>
		</orderedlist>

	</sect2>

	<sect2 id="non-gnu">
		<title>Non-GNU applications</title>

		<para>Some applications, especially non-GNU applications such as <application>Mozilla Firefox</application>, do not honor the priority list feature. Hence a message will be displayed in the first choice language, if a translation into that language is available, or else it will simply be displayed in English.</para>

	</sect2>

</sect1>

<!-- ================ Language Support ==================== -->

<sect1 id="support-tool">
	<title><application>Language Support</application></title>

	<para>The desired display language(s) and related settings can be set from <application>Language Support</application>. Look up <guilabel>Language Support</guilabel> from the settings GUI of your desktop or start the tool by running the command <code>gnome-language-selector</code>.</para>

	<para>There are both system wide and user specific settings. The controls for system wide settings are the <guibutton>Apply system-wide</guibutton> buttons and the <guibutton>Install / Remove Languages...</guibutton> button, and to make system wide changes you need to enter a password for a user with admin privileges.</para>

	<para>The <guilabel>Language Support</guilabel> window includes two tabs: <guilabel>Language</guilabel> and <guilabel>Regional Formats</guilabel>.</para>

	<sect2 id="lang-tab">
		<title>Language</title>

		<para>The box <guilabel>Language for menus and windows</guilabel> contains items representing the translations that are available on the system. The current <emphasis>language priority list</emphasis> consists of the first items with black characters. Below, displayed in grey, are the other available translations. To add a translation to the language list, you pick a greyed item, drag it upwards, and drop it at a position above the <quote>English</quote> item.</para>

		<para>By clicking the <guibutton>Apply system-wide</guibutton> button, the system language list is set to the same items as your own current list. The system language setting controls the display language at startup and on the login screen. It also serves as a default value for users who have not set a user language setting.</para>

		<para>The button <guibutton>Install / Remove Languages...</guibutton> opens the <guilabel>Installed Languages</guilabel> window with a list of all the languages that can be downloaded and installed on the system. Currently installed languages are the checked items in the list. To install a new language, you check it in the list and click the <guibutton>Apply Changes</guibutton> button. That will download and install both the language's translations and other related components if any.</para>

		<para>To type certain languages, a more complex input method than just a simple key to character mapping is required. Through the <guilabel>Keyboard input method system</guilabel> drop-down list you can set a framework for input methods which will be started automatically at login. Recommended input method frameworks are <quote>IBus</quote> and <quote>Fcitx 5</quote>. IBus is conveniently integrated in Ubuntu with GNOME, while that is not the case with Fcitx 5. If you want to use alternative systems, install the corresponding packages first and then choose the desired system from the drop-down list.</para>

	</sect2>

	<sect2 id="format-tab">
		<title>Regional formats</title>

		<para>Typically there are country or region based conventions for how numbers, date and time, currency, etc. are denoted, and each item in the drop-down list at the top of the <guilabel>Regional Formats</guilabel> tab represents a set of format rules. If you change the setting, examples of what the new setting results in are instantly shown at the bottom of the tab.</para>

		<para>By clicking the <guibutton>Apply system-wide</guibutton> button, the system value is set out from your own current setting. The system format setting controls the display formats at startup and on the login screen. It also serves as a default value for users who have not set a user format setting.</para>

	</sect2>

</sect1>

<!-- =============== Alternative language settings ============= -->

<sect1 id="alt-language">
	<title>Alternative language settings</title>

	<para>Unlike the <guilabel>Language</guilabel> tab in <application>Language Support</application>, the below language controls do not let you compose a complete <emphasis>priority list</emphasis>. Instead the one language you select is prepended to the previous list.</para>

	<sect2 id="region-language">
		<title>Region &amp; Language panel</title>

		<para>On Ubuntu with GNOME, and on other desktops which use GNOME's settings menu, you can change the display language from the <guilabel>Region &amp; Language</guilabel> panel.</para>

	</sect2>

	<sect2 id="login-screen">
		<title>Login screen</title>

		<para>One of the <application><ulink url="https://www.freedesktop.org/wiki/Software/LightDM">LightDM</ulink></application> compatible login greeters, <emphasis>lightdm-gtk-greeter</emphasis>, provides an alternative control for setting the own user language.</para>

		<!-- a link to "addremove-install.page" might be appropriate here -->
		<para>To get a language chooser on the login screen, please install the package <emphasis>lightdm-gtk-greeter</emphasis> if it's not installed already.</para>

		<para><emphasis>Note:</emphasis> GDM, which is the default display manager on Ubuntu with GNOME, does not provide a language chooser on the login screen.</para>

	</sect2>

</sect1>

<!-- ============= Advanced format settings =================== -->

<sect1 id="format-advanced">
	<title>Advanced format settings</title>

	<para>The <application>Language Support</application> method for setting regional formats assumes that one language-country combination (<ulink url="https://en.wikipedia.org/wiki/Locale">locale</ulink>) is sufficient to set all the format aspects in accordance with your preferences. Even if that is often the case, situations when you want more fine tuned format settings may occur. For such a case, below are some variables that you may want to assign locale names individually. You can do so by editing the <filename>.profile</filename> configuration file in your home folder.</para>

	<variablelist>

		<varlistentry>
		  <term><command>LC_NUMERIC</command></term>
		  <listitem><para>How you format your numbers. For example, in many countries a point is used as a decimal separator, while others use a comma.</para></listitem>
		</varlistentry>

		<varlistentry>
		  <term><command>LC_TIME</command></term>
		  <listitem><para>How your time and date are formatted.</para></listitem>
		</varlistentry>

		<varlistentry>
		  <term><command>LC_MONETARY</command></term>
		  <listitem><para>What currency you use, its name, and its symbol.</para></listitem>
		</varlistentry>

	</variablelist>

	<para><ulink url="https://help.ubuntu.com/community/Locale">Click here</ulink> for more <command>LC_*</command> variables with explanations.</para>

	<para><emphasis role="strong">An example</emphasis></para>

	<para>Take a user in the US who choose <quote>English (United States)</quote> in the drop-down list on the <guilabel>Regional Formats</guilabel> tab. If s/he prefers that dates and times are displayed more like what <ulink url="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</ulink> prescribes than what's typically the case in the US, the below line may be added to the <filename>.profile</filename> file:</para>

	<para><code>export LC_TIME=en_DK.UTF-8</code></para>

</sect1>

</article>

