User interface displays in English

Hi!
I am having problems getting the Jenkins UI to show up in anything but English. My browser correctly outputs an Accept-Language string:

Accept-Language: sv,nb;q=0.9,en-US;q=0.8,en;q=0.7

but the user interface still displays in English.

If I request the same document with my phone browser, the UI shows in Swedish, so I know it is capable. The mobile version sends

Accept-Language: sv-SE,sv;q=0.9,nb-NO;q=0.8,nb;q=0.7,en-GB;q=0.6,en;q=0.5,en-US;q=0.4

I am running Jenkins 2.462.3 installed from .deb package, running on an Ubuntu 24.04 LTS server. The Jenkins Java app is responding directly on port 80, there is no intermediates to rewrite the queries.

Using Vivaldi (7.0.3495.6) on Debian desktop (displays English) and Vivaldi for Android (6.9.3451.114).

I know little about this topic, but if that’s acceptable you could force the default language globally: Locale

That said I think I found the bug here:

    private static final Set<String> ALLOWED_LOCALES = new HashSet<>(Arrays.asList(
3 months ago

Use en locale and include core fix for help text (#233)
            "bg", "ca", "cs", "da", "de", "el", "en", "es", "es_AR", "et", "fi", "fr", "he", "hu", "it", "ja", "ko",
4 months ago

Dropdown feature for Locale selection (#215)
            "lt", "lv", "nb_NO", "nl", "pl", "pt_BR", "pt_PT", "ro", "ru", "sk", "sl", "sr", "sv_SE", "tr", "uk",
            "zh_CN", "zh_TW"));

There is a list of allowed locales and it has sv_SE but not sv or sv_FI either. So your problem is that your desktop browser only sends sv and not sv-SE which your phone does, the plugin then does not find a match and defaults to English.

You should file a bug report with the locale plugin:

1 Like

Thanks, that does indeed look like the problem. A website can chose to return a generic language when given a language-country pair, but not the other way, so it is allowed to return sv when passed sv-SE, but not the opposite.

I’ll file a bug for it.

1 Like