Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10: keepassxc uses the wrong language #1924

Closed
macau23 opened this issue May 9, 2018 · 15 comments
Closed

Windows 10: keepassxc uses the wrong language #1924

macau23 opened this issue May 9, 2018 · 15 comments

Comments

@macau23
Copy link

macau23 commented May 9, 2018

I have keepassxc set to the default system language. The problem is, that in Windows this is perhaps not so simple.

There is a "Windows display language" set to English, and all my windows and prompts are in English. When I open the control panel, the labels are in English, when I open a menu in a system application the text is in English.

Then there are "Languages", of which you can enter as many as you like. They are sorted alphabetically. I have Deutsch and English.

Then there is a "Country or region" which is my country (this is hopefully irrelevant).

Then I have one or more keyboard settings (this is hopefully irrelevant).

Expected Behavior

I expect keepassxc to use the "Windows display language", i.e. English.

Current Behavior

It is using German, so I guess the Country or region setting, or the first option under the Language setting is being used.

Possible Solution

Steps to Reproduce (for bugs)

Context

Debug Info

KeePassXC - 2.3.2
Revision: REVISION

Libraries:

  • LIBS

Operating system: Windows 10
CPU architecture: x86_64
Kernel: KERNEL

Enabled extensions:

  • EXTENSIONS
@hifi
Copy link
Member

hifi commented May 15, 2018

We use QLocale::system().name() as the source for the system language which is documented as "Returns a QLocale object initialized to the system locale.".

One alternative would be to prefer the first item returned from QLocale::uiLanguages() but it may need converting to an actual locale which may not be trivial.

@macau23
Copy link
Author

macau23 commented May 16, 2018

Do you want to lookup the system locale, or the preferred UI language? (isn't that QLocale::uiLanguages() ?)

@phoerious
Copy link
Member

phoerious commented May 16, 2018

I would prefer the system locale. At least that makes the most sense to me. If Windows has a different setting for the display language, which is independent of the locale setting, I'm not really sure if it's our job to respect that. I'm also not really sure what the locale setting is supposed to be for if not the language. Region, number format and currency settings are almost always configurable separately.

@macau23
Copy link
Author

macau23 commented May 16, 2018

There is a system locale, a user locale, an input locale, and a display language.

@phoerious
Copy link
Member

phoerious commented May 16, 2018

So system locale is the standard language setting by the system administrator which can be overridden by the user? I would assume that Qt uses that and to me it also makes the most sense. lt does not occur to me, though, why you would want to have another language setting on top of that if you can already set a locale override.

@macau23
Copy link
Author

macau23 commented May 16, 2018

Windows has a few locale/language concepts, and first I should probably mention the distinction between "locale" and "language". Locales have information about a user's language and region, like whether a preferred date format might be M.d.y. or d/M/y, and whether a month's name is "January" or "Ianuali". Language is usually thought of in terms of "UI Language", like what language I see in Windows or a program.....

from https://blogs.msdn.microsoft.com/shawnste/2011/11/09/user-locale-system-locale-ui-language-language-profile-all-that/

@macau23
Copy link
Author

macau23 commented May 16, 2018

why you would want to have another language setting on top of that if you can already set a locale override.

Because I can't configure that.

In Windows 10, I can set my country or region, then the languages that I can understand. There is no order/preference for the languages I can understand (edit: the old non-metro settings app does let me define an order, but the display language remains a separate concept). Then I can set a display language, which I have set to English.

@phoerious
Copy link
Member

So the problem appears to be that: you set a locale, which brings its defaults, and then you can configure a deviant language setting. My Linux system does it the other way round: I can configure a locale and then change region, number format, date and time settings. In the latter case, the locale is a good indicator for the language, in the former it's not.
I don't have a Windows system to test it right now, but I think you could also do it the other way round as an immediate fix of the issue.

@macau23
Copy link
Author

macau23 commented May 16, 2018

I'm not sure I would say it's a problem, but that is the way it works :)

On my Linux box it makes more sense.

@droidmonkey
Copy link
Member

Im not sure what the big deal is. Just change the language using the pull down in the settings menu.

@macau23
Copy link
Author

macau23 commented May 16, 2018

There is no big deal. I was just reporting that by default, keepassxc displays in a different language to all my other applications.

@macau23 macau23 closed this as completed May 16, 2018
phoerious pushed a commit that referenced this issue Apr 20, 2019
Use built-in facilities of Qt to traverse QLocale::uiLanguages() to find a valid "most preferred"
language, but still respect user's choice in the application settings.
Fixes #3030. Fixes #1924.
@janlimpens
Copy link

Since the last version KeePassXC uses the language of the country I am in, not the language of my system's UI. It is the only application that acts this way and did not do so in the past. This started happening on macOs Mojave and still is the same in Catalina. KPXC 2.4.3.
I cannot find any setting to change this. Also, on Catalina, it usually is possible to set a specific application's language to something - this is not possible for KeePassXC.

@droidmonkey
Copy link
Member

You can set your language from within the KeePassXC settings.

@janlimpens
Copy link

janlimpens commented Oct 16, 2019

@droidmonkey , thanks, it really was there! Odd, though, that the picked "default" language is different from all other applications on the system. It seems the bug/feature is still there.
At first I did not find this setting, because with a trackpad active, macOS hides scrollbars by default and there is no indication, that you need to scroll downs the general section to find the setting. UI wise this ought to be considered, IMHO.

@droidmonkey
Copy link
Member

droidmonkey commented Oct 16, 2019

I can't speak for Mac's desire to hide scroll bars, but the language issue is corrected for the next release. There is a bug in Qt's implementation of the language choice when multiple languages are defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants