elementary / switchboard-plug-locale

Switchboard Locale Plug
GNU Lesser General Public License v3.0
11 stars 10 forks source link

Fix some language and region names not shown in own languages #211

Closed ryonakano closed 2 months ago

ryonakano commented 2 months ago

Fixes #15

We set LANGUAGE environment variable and then call Gnome.Languages.get_language_from_locale or Gnome.Languages.get_country_from_code to get language and region names in their own languages.

However, we don't set LANGUAGE with both ISO 639 language code and ISO 3166 territory name (e.g. "ja_JP" or "zh_CN") here. Instead, we set it only with ISO 639 language code (e.g. "ja" or "zh").

Just setting language code doesn't work for some languages that has variants like Chinese and thus the Gnome.Languages APIs returns untranslated language names.

After

Screenshot from 2024-06-19 00-14-25

Before

Screenshot from 2024-06-18 23-52-54