File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ public class Installer.App : Gtk.Application {
7979}
8080
8181public static int main (string [] args ) {
82+ // When the installer starts on a live iso session, LANG is set to C.UTF-8, which causes gettext to ignore the
83+ // LANGUAGE variable. To enable runtime language switching, we need to set LANG to something other than C.UTF-8. See:
84+ // https://github.com/autotools-mirror/gettext/blob/8f089a25a48a2855e2ca9c700984f4dc514cfcb6/gettext-runtime/intl/dcigettext.c#L1509-L1525
85+ var current_lang = Environment . get_variable (" LANG" );
86+ if (current_lang == null || current_lang. has_prefix (" C." )) {
87+ Environment . set_variable (" LANG" , " en_US.UTF-8" , true );
88+ }
89+
8290 GLib . Intl . setlocale (LocaleCategory . ALL , " " );
8391 GLib . Intl . bindtextdomain (Build . GETTEXT_PACKAGE , Build . LOCALEDIR );
8492 GLib . Intl . bind_textdomain_codeset (Build . GETTEXT_PACKAGE , " UTF-8" );
You can’t perform that action at this time.
0 commit comments