pgadmin-org / pgadmin-org/pgadmin4

It seems impossible to change the default language used on the login page

Open
#5,692 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Python
Stars
3.8k
Forks
891
Avg merge
4d 7h
Merged PRs (30d)
8

Description

Describe the bug

When running pgAdmin4 in server mode, the login page is always in english

To Reproduce

Steps to reproduce the behavior:

  1. Go to pgAdmin4
  2. Labels read "Login" or "Forgotten your password"

Expected behavior

In my docker-compose.yml file, I tried setting the environment variable:

PGADMIN_DEFAULT_LANGUAGE=fr

I also tried adding to the "config_system.py" the following line:

DEFAULT_SERVER_LANGUAGE = 'fr'

I tried removing all the other languages, except french in the config_system.py file:

LANGUAGES = {
    'fr': 'French',
#    'en': 'English',
}

The list contains only one option, but the rest of the UI is still in English:
image

I use the latest "dpage/pgadmin4" docker image

Additional context

I think that once you are connected, the language of the UI can be changed, but I would like to change the language of the default landing page as well.

It seems that those strings are hardcoded in the source code:
https://github.com/pgadmin-org/pgadmin4/blob/master/web/pgadmin/templates/security/login_user.html#L23

So it might be more of a feature request ?

Thanks,
Fabien

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with web/pgadmin/templates/security/login_user.html at the referenced login labels, then inspect config_system.py and the existing language settings. Reproduce the server-mode login page with PGADMIN_DEFAULT_LANGUAGE=fr and confirm that the landing-page labels follow the configured language while the rest of the language behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
authentication, localization
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.