Closed selvanair closed 1 year ago
Is there a way to detect locale automatically and select language based on it? IMHO language selection in PLAP dialog is an overkill.
The current logic should select the language based on the default UI language for the user. I tested this by changing the display language in control panel: the GUI picks up this correctly if no language is set in the registry. The login screen also picks this up, but openvpn-plap dialogs do not: e.g, password prompt is still in English though system generated buttons like Retry/Cancel do get localized.
I do not know how this works in a fully localized OS installation. May be we need to use something other than GetUserDefaultUILanguage() to get the display language when running as system?
IMHO language selection in PLAP dialog is an overkill.
+1
After changing the user display language to a non-native language, selecting to apply this to "welcome screen and system account" is required to set that language for SYSTEM. After that GetUserDefaultLanguage() from PLAP dll returns the expected value.
Can anyone with localized version of Windows confirm that password and other popup dialogs from PLAP screen (preferably with no user logged in, instead of from lock screen) displays in the expected language? PLAP progress dialog messages are not yet fully translated, so only the buttons may show as localized on that window.
I have Finnish locale. It looks like PLAP UI is semi-localized - see the screenshots. Username/password dialog appears to be non-localized at all in PLAP, compared to user sessions.
So, only the system generated button (the "back" button in PLAP) shows localized. Is that with lock-screen with a user logged-in or with no users logged-in? The two could be different as I have seen Windows using the logged-in user's language in Welcome screen when screen is locked, while the system default language is used when no one is logged in.
PLAP dll should pickup the system default language which I thought would be Finnish in your case -- but may be it stays English even on localized installations?
The screenshot below is with display language set to Japanese on an English version of Windows 10, with same language applied to Welcome screen and system (using administrative tab of Region settings). Language for user in the GUI is still set to English.
This is with PR #554, but that only adds some localized resources, no change in language selection logic. So PLAP does pick up the system default language in this case.
I have a PR ready for this, but we currently have no way to select the language from the PLAP screen. This is not a big limitation as we default to the system's locale (I think), and, if supported, we use the corresponding language for the UI. But, in OpenVPN-GUI we go beyond that and let the user customize the language selection.
Should we add a language selection dialog to the PLAP connect screen or is the current behaviour good enough?