About Language Packs
Language packs are used in Ubuntu to deliver and install translations for packages in Ubuntu Main and Restricted. They are also used to install other language-specific packages and content, such as dictionaries, fonts and input methods.
This is a different approach for installing translations than the pure package-based approach used for other debian packages.
So let's take a look at the pure Debian, package-based approach first, and then see how Ubuntu does it differently.
The Package-Based Approach
In this approach, the package installs all of its translations. For example, suppose there is a package named "Foo". The Foo source package includes all of its translations. And, when the Foo binary package is installed, all those translations are installed.
This is straightforward. However, it often uses up disk space unnecessarily because most users only want the translation for their particular language or languages.
This waste of disk space becomes more problematic when duplicated over the many many packages in a distribution like Ubuntu.
The Ubuntu Language Package Approach
To give the user only the translations they are interested in, Ubuntu uses language packs (for packages in Main and Restricted).
Note: Packages from other sources, such as Universe or Debian itself, typically deliver their own translations.
Packages Take Precedence
A user may have a package installed from Ubuntu Main. And, they may later install a version from Debian. That later version may be different, and if so, it needs to be translated appropriately.
Therefore, Ubuntu uses a fall-back approach for finding a translation at run time.
As we have seen, each package has a translation domain used to retrieve translations from a specific translation catalog file at run time (for the current locale).
In Ubuntu, there are two places where the translation catalogs are looked for:
First, the package location is checked.
If the catalog is not found there, the language pack location is checked.
This approach enables Ubuntu language packs to provide translations (for Main and Restricted) unless the package is installed from some somewhere else, in which case its translations take precedence.
Lang pack translations are installed here: /usr/share/locale-langpack/$LANG/LC_MESSAGES/$DOMAIN.mo
Package translations are installed here: /usr/share/locale/$LANG/LC_MESSAGES/$DOMAIN.mo
There is one other important piece of this puzzle: Launchpad Translations.
Translators work on packages whose translations are delivered by language packs in Launchpad Translations, as described next.
UbuntuDevelopment/Internationalisation/InternationalizationPrimer/LanguagePacks (last edited 2010-08-11 17:29:20 by eth3)