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

user interface language cannot change without admin privilege in Windows (localiziation) #13979

Closed
Mahmood-Taghavi opened this issue Aug 6, 2023 · 11 comments

Comments

@Mahmood-Taghavi
Copy link

Description of the Issue

I use Notepad ++ v8.5.4 in Windows 10.0.19044 as an ordinary user in a corporate in Denmark. But I am not Danish so I need to change the user interface into English. However, after selecting English and confirming the choice nothing happens!

Steps to Reproduce the Issue

Notepad++ is installed by our corporate webshop in "C:\ProgramData\Notepad++" and Windows does not let me change these files without admin privilege. I guess by trying to change Notepad++ user-interface language using an ordinary user privilege you could replicate the issue.

Expected Behavior

I expect that changing the user interface language should be something straightforward and doesn't need admin privilege :)

nativeLang.zip

@alankilborn
Copy link
Contributor

How exactly are you changing the language? (Your attaching of nativeLang.zip makes me think you may be trying to "back door" a change)

@Mahmood-Taghavi
Copy link
Author

No, I tried to change the localization into English using the menu and nothing happened!
I provided nativeLang.zip just for the possibility that it could help you to find the problem.
I believe it must be a "Notepad++" sub-folder in %appdata% with higher priority with respect to the installation folder but it isn't available. Even if I create "Notepad++" with the localization sub-folder in %appdata%, nothing changes (still just two Danish and English options are available while I also added more localization files such "farsi.xml" in "AppData\Roaming\Notepad++\localization" and still choosing English using ordinary user privilege doesn't change the localization of Notepad++ user interface)!

@donho
Copy link
Member

donho commented Aug 7, 2023

Please provide your debug info if you need better help.

@Mahmood-Taghavi
Copy link
Author

Notepad++ v8.5.4 (64-bit)
Build time : Jun 17 2023 - 20:42:45
Path : C:\ProgramData\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : ON
Cloud Config : OFF
OS Name : Windows 10 Enterprise (64-bit)
OS Version : 21H2
OS Build : 19044.3208
Current ANSI codepage : 1252
Plugins :
mimeTools (2.9)
NppConverter (4.5)
NppExport (0.4)

@victorel-petrovich
Copy link

However, after selecting English and confirming the choice nothing happens!

When you first time tried to do that, was English already present in Preferences -> General -> Localization ? Or no, and you added it yourself in %AppData% first ?

@Mahmood-Taghavi
Copy link
Author

English is available in the list by default (besides just Danish) but choosing it does not change the user interface language. Actually, it only works if the Notepad ++ is run as admin.

@donho
Copy link
Member

donho commented Aug 8, 2023

@Mahmood-Taghavi
According your debug mode:

Path : C:\ProgramData\Notepad++\notepad++.exe
Local Conf mode : ON

You should remove nativeLang.xml from C:\ProgramData\Notepad++\ .
Once it is done, your Notepad++ will speak English normally.

@rdipardo
Copy link
Contributor

rdipardo commented Aug 9, 2023

Local Conf mode : ON

Looks like the organization wants to control all configuration options, presumably for security.

They might not be aware that (since about version 7.6) plugins are always loaded from the application's installation directory, regardless of how local config mode is set (i.e., whether or not the magic doLocalConf.xml file exists in the application's install directory).

@Mahmood-Taghavi, since you'll need clearance to do what @donho suggested above, you may also want to make your employer aware of the full implications of local config mode, which prevents the creation of per-user settings for all customizable options, including shortcuts and UI language.

@Mahmood-Taghavi
Copy link
Author

Thank you all for your prompt and insightful responses :)
Now I see "doLocalConf.xml" is located in the installation folder which, based on the below manual, prevents Notepad++ to look at the local configuration at "%AppData%\Notepad++"
The notepad++ manual of Configuration Files discusses this here: https://npp-user-manual.org/docs/config-files/
I assume my organization has created the installation file using a portable version of Notepad++, as it comes with "doLocalConf.xml" file, so I should inform them that this set Danish again in each Notepad++ update and put me in trouble.
To my best understanding, my options, for now, are as below:

  1. Contact our IT and ask them to run Notepad++ as admin and chose English for me (Settings -> Preferences -> General -> Localization).
  2. Contact our IT and ask them to delete "nativeLang.xml" from "C:\ProgramData\Notepad++" as an admin user to set English as default localization for me.
  3. Contact our IT and ask them to delete "doLocalConf.xml" from "C:\ProgramData\Notepad++" as an admin user to let me use local configurations (Localization, shortcuts, stylers, themes, and plugins).
  4. To use a portable version of Notepad++ to easily have my own peace and be able to save all my customization. However, in this case I will not have the right-click context menu in the explorer ("Edit with Notepad++") to quickly access Notepad++.
    Finally, in my opinion, accessing a local Notepad++ configuration does not expose any excess risk to organizations. Am I right?
    Any idea regarding possible security risks of having a local configuration is appreciated!

@victorel-petrovich
Copy link

4. To use a portable version of Notepad++ to easily have my own peace and be able to save all my customization. However, in this case I will not have the right-click context menu in the explorer ("Edit with Notepad++") to quickly access Notepad++.

You could add that yourself, see new version of manual here: https://github.com/notepad-plus-plus/npp-usermanual/blob/master/content/docs/shell-extension.md#manual-edit-with-notepad-action

@Mahmood-Taghavi
Copy link
Author

I appreciate all your suggestions. The portable Notepad++ with this last trick also has right-click context menu. So, finally, it is functioning perfectly, even without requiring admin privileges :)

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

No branches or pull requests

5 participants