Jump to content

Localization: Difference between revisions

From postmarketOS Wiki
TravMurav (talk | contribs)
Languages packages: lang metapackage can pull all required translations
m rollbackEdits.php mass rollback
Tag: Rollback
 
(2 intermediate revisions by 2 users not shown)
Line 23: Line 23:


It's possible to automatically install <code>-lang</code> subpackages for installed software by installing <code>lang</code> metapackage: <code> $ apk add lang </code>
It's possible to automatically install <code>-lang</code> subpackages for installed software by installing <code>lang</code> metapackage: <code> $ apk add lang </code>
The list below contains useful information about some language packages.
=== MATE ===
Run <code> # apk add $(apk list mate-*-lang | grep -o "^[A-Za-z\-]*" | rev | cut -c 2- | rev) && apk add caja-lang </code>. This will find and install all necessary packages automatically. All applets (network-manager, etc.) also need their lang packages.


[[Category:Guide]]
[[Category:Guide]]

Latest revision as of 14:31, 23 April 2023

This article explains how to set up language and locale for the entire system and apps in particular.

Locale

Locale names are typically of the form language[_territory][.codeset][@modifier] , where language is an ISO 639 language code, territory is an ISO 3166 country code, and codeset is a character set or encoding identifier like ISO-8859-1 or UTF-8.

To set up your locale you need to change LANG and LC_COLLATE in /etc/profile.d/locale.sh file.

Config for Russian language, for example:

/etc/profile.d/locale.sh
export CHARSET=UTF-8
export LANG=ru_RU.UTF-8
export LC_COLLATE=ru_RU

From now software, that has the translations files will use selected language.


Languages packages

In Alpine Linux, translations for applications are shipped in a separate package with -lang at the end of their name. Usually, it can be easily found by $ apk list packagename-lang or $ apk list packagename-lang-* , if each language ships in separate package (like libreoffice).

It's possible to automatically install -lang subpackages for installed software by installing lang metapackage: $ apk add lang