Language settings not applied correctly after logout #9828

Closed
opened 2025-12-29 21:23:17 +01:00 by adam · 4 comments
Owner

Originally created by @bone6000 on GitHub (Jun 11, 2024).

Originally assigned to: @jeremystretch on GitHub.

Deployment Type

Self-hosted

NetBox Version

v4.0.2

Python Version

3.10

Steps to Reproduce

  1. Changed language to "english" in user profile.
  2. All menus are changing to english correctly
  3. Logout and login again in netbox
  4. All menus are in spanish but in profile configuration language "english" is selected
  5. Pressing "Save" without changing profile config, changes the language back to english, but the issue reproduces if logout again

image

Expected Behavior

Language settings should not be "lost" when logout

Observed Behavior

Language changes to spanish (default machine language) when logging out but user profile settings is in english

Originally created by @bone6000 on GitHub (Jun 11, 2024). Originally assigned to: @jeremystretch on GitHub. ### Deployment Type Self-hosted ### NetBox Version v4.0.2 ### Python Version 3.10 ### Steps to Reproduce 1. Changed language to "english" in user profile. 2. All menus are changing to english correctly 3. Logout and login again in netbox 4. All menus are in spanish but in profile configuration language "english" is selected 5. Pressing "Save" without changing profile config, changes the language back to english, but the issue reproduces if logout again ![image](https://github.com/netbox-community/netbox/assets/70219407/cdcea2a0-51dc-4442-9378-226924dc1d00) ### Expected Behavior Language settings should not be "lost" when logout ### Observed Behavior Language changes to spanish (default machine language) when logging out but user profile settings is in english
adam added the type: bugstatus: acceptedtopic: UI/UXseverity: low labels 2025-12-29 21:23:17 +01:00
adam closed this issue 2025-12-29 21:23:17 +01:00
Author
Owner

@wargbang commented on GitHub (Jun 13, 2024):

NetBox Version
v4.0.5

Python Version
3.10

I see the same behavior with the language "German". But a little different.

  1. Changed language to "english" in user profile.
  2. All menus are changing to english correctly
  3. Logout and login again in netbox
  4. Language remains in the "English" setting.

However, the language does not reset when I "log out" and "log in" in my Case. After a period of time unknown to me, the language changes automatically back to "German". And then I have the same behaviour like bone6000:

All menus are in german but in profile configuration language "english" is selected

@wargbang commented on GitHub (Jun 13, 2024): **NetBox Version** v4.0.5 **Python Version** 3.10 I see the same behavior with the language "German". But a little different. 1. Changed language to "english" in user profile. 2. All menus are changing to english correctly 3. Logout and login again in netbox 4. Language remains in the "English" setting. However, the language does not reset when I "log out" and "log in" in my Case. After a period of time unknown to me, the language changes automatically back to "German". And then I have the same behaviour like **bone6000**: All menus are in german but in profile configuration language "english" is selected
Author
Owner

@jeffgdotorg commented on GitHub (Jun 14, 2024):

Thanks for reporting a problem you're experiencing with NetBox.

In an attempt to reproduce this issue, I set up the following systems:

  • A NetBox 4.0.5 VM installed on an Ubuntu 22.04 LTS cloud-init image per the official docs install instructions; this is my standard lab VM in a Proxmox VE cluster.
  • A desktop VM installed with Ubuntu 24.04 from the desktop live image, with GUI installation done to disk (controlled via VNC) and switched to Spanish at the first opportunity during installation. I used Firefox as the browser.

The server looks like this:

ubuntu@nb405-repro-16512:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
ubuntu@nb405-repro-16512:~$ echo $LANG
C.UTF-8

And the desktop looks like this:

jeffg@el-jefe-u2404-es:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
jeffg@el-jefe-u2404-es:~$ echo $LANG
es_ES.UTF-8

image

As the screen recording below shows, I did not manage to reproduce the problem as described using this setup.

https://github.com/netbox-community/netbox/assets/1209268/ca5fda0a-59d9-4c22-af22-557795da2655

Can you please provide the equivalent details about your desktop and server systems? It seems plausible that the C locale on my server side might be responsible for US English being the default language that gets rendered. If your server side is set to an es locale, perhaps that's leading to Spanish being the default rendered language.

@jeffgdotorg commented on GitHub (Jun 14, 2024): Thanks for reporting a problem you're experiencing with NetBox. In an attempt to reproduce this issue, I set up the following systems: - A NetBox 4.0.5 VM installed on an Ubuntu 22.04 LTS cloud-init image per the official docs install instructions; this is my standard lab VM in a Proxmox VE cluster. - A desktop VM installed with Ubuntu 24.04 from the desktop live image, with GUI installation done to disk (controlled via VNC) and switched to Spanish at the first opportunity during installation. I used Firefox as the browser. The server looks like this: ``` ubuntu@nb405-repro-16512:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=22.04 DISTRIB_CODENAME=jammy DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS" ubuntu@nb405-repro-16512:~$ echo $LANG C.UTF-8 ``` And the desktop looks like this: ``` jeffg@el-jefe-u2404-es:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=24.04 DISTRIB_CODENAME=noble DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS" jeffg@el-jefe-u2404-es:~$ echo $LANG es_ES.UTF-8 ``` ![image](https://github.com/netbox-community/netbox/assets/1209268/b15f82ed-508a-4619-b711-c98129d7f820) As the screen recording below shows, I did not manage to reproduce the problem as described using this setup. https://github.com/netbox-community/netbox/assets/1209268/ca5fda0a-59d9-4c22-af22-557795da2655 Can you please provide the equivalent details about your desktop and server systems? It seems plausible that the `C` locale on my server side might be responsible for US English being the default language that gets rendered. If your server side is set to an `es` locale, perhaps that's leading to Spanish being the default rendered language.
Author
Owner

@jeremystretch commented on GitHub (Jun 17, 2024):

I can reproduce this following these steps:

  1. Log in as a user with no preferred language. The UI shows English (for me, at least).
  2. Set your preferred language to Spanish and confirm that the UI is now in Spanish.
  3. Open a new private browser window and log in as the same user.
  4. The UI should be in Spanish, per the user's preference, but I see it in English. The user's preference page shows Spanish as the preferred language.
@jeremystretch commented on GitHub (Jun 17, 2024): I can reproduce this following these steps: 1. Log in as a user with no preferred language. The UI shows English (for me, at least). 2. Set your preferred language to Spanish and confirm that the UI is now in Spanish. 3. Open a new _private_ browser window and log in as the same user. 4. The UI should be in Spanish, per the user's preference, but I see it in English. The user's preference page shows Spanish as the preferred language.
Author
Owner

@bone6000 commented on GitHub (Jun 17, 2024):

Hello,

My desktop is a Windows 11 in spanish language.
The netbox server is a Centos 8 distribution with "es" locale configured

[usertst@netbox01]$ cat os-release
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"

Regards

@bone6000 commented on GitHub (Jun 17, 2024): Hello, My desktop is a Windows 11 in spanish language. The netbox server is a Centos 8 distribution with "es" locale configured [usertst@netbox01]$ cat os-release NAME="CentOS Linux" VERSION="8" ID="centos" ID_LIKE="rhel fedora" VERSION_ID="8" PLATFORM_ID="platform:el8" PRETTY_NAME="CentOS Linux 8" ANSI_COLOR="0;31" CPE_NAME="cpe:/o:centos:centos:8" HOME_URL="https://centos.org/" BUG_REPORT_URL="https://bugs.centos.org/" CENTOS_MANTISBT_PROJECT="CentOS-8" CENTOS_MANTISBT_PROJECT_VERSION="8" Regards
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9828