Skip to content

plugins/language: get language list from active translations

(besides what written below, this change adds quite a few languages to the list)

Instead of obtaining the language list by enumerating the language packs (which don't exist in Ubuntu 20.04), get it from enumerating the gettext translation files available for the System Settings.

A few adjustments have to be done to the list:

  • manually hardcode "en_US" and "en_CA", which don't have a translation available but which were anyway present in the list;
  • exclude all languages rendered in a script for which we have no font available;
  • exclude all languages for which the translation file for the System Settings weighs less than 10 KB, which means it's fairly incomplete;
  • exclude all locales which do not appear in the output of locale -a.

Fixes: #286 (closed)

Edited by Ratchanan Srirattanamet

Merge request reports