LanguageSettings

What's a language?

The purpose with a UI for setting languages is to let the user select a translation to be used for displaying menus and messages. Hence, in Ubuntu a list of languages consists of items representing installed translations.

Please note:

  • Some language-packs, e.g. English, Portuguese and Catalan, contain more than one translation.
  • Some universe packages seem to include country specific translations in addition to such country specific translations that can be found in some base language-packs.
  • A list of all locales does not present the available language options properly, since many locales do not correspond with a translation.

Fallback language(s)

In Ubuntu the translations rely heavily on volunteer work, and some of them are incomplete. It means that the LANGUAGE environment variable is well suited. LANGUAGE is populated with a priority list of language codes, e.g. 'de:pt_PT:en', and in this case 'pt_PT' and 'en' serve as fallback languages if a string wouldn't currently be translated into German. This works with most GNU (or rather 'GNU compatible') apps/tools.

Language setting UIs

In Oneiric there are three user interfaces for setting language:

  • language-selector
  • the User Accounts widget in gnome-control-center
  • the language chooser in LightDM's gtk greeter

They all make use of the accountsservice package, which provides both the current language and the list of available language options.

The language options list consists of all the options that it makes sense to present to the user in language chooser UIs, given which languages are installed. It contains items such as 'en_GB' and 'es', and that format is suitable to put into the LANGUAGE priority list without a need for adjustment.

The UI in language-selector for setting language lets the user control the exact contents of the LANGUAGE priority list, while the other UIs let the user pick one prefered language, which then is used by accountsservice to update the previously saved LANGUAGE list.

http://gunnar.cc/img/language-settings.png

Planned changes for the Precise development cycle

Region and Language

It's planned to begin using the Region and Language widget in g-c-c instead of language-selector. Region and Language is undergoing changes, which are the subject of discussion.

From an Ubuntu POV it's highly desirable that Region and Language will

  • include a UI for maintaining the LANGUAGE priority list, and
  • offer a way to present to the user a language options list composed as described above

without a need to apply complicated patches.

Setting the user environment

Up to 11.10, the LANGUAGE list and the locale representing the prefered language have been stored in ~/.profile, which in turn has been sourced by display managers to set the user language. It's planned to exchange ~/.profile for ~/.pam_environment as the storing place for the language related user environment.

Code tweaking in accountsservice

The code that supports the above described way to use accountsservice is of a temporary nature, and it's currently carried by a couple of Ubuntu specific patches. It's planned to rewrite some shell and Perl code using C, and to try getting the code accepted upstream. Adding a few new properties, such as LanguageList, LanguageLocale, and FormatsLocale should be considered as well.


CategoryDesktopTeam CategoryTranslations

LanguageSettings (last edited 2011-11-08 13:13:13 by gunnarhj)