Skip to content

Commit 88dfaf6

Browse files
committed
Enable localization for non-portable N++ installations
1 parent c3ceba1 commit 88dfaf6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/LibNppPlugin/LocalizedPlugin.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ void LocalizedPlugin::setLanguage() {
4545
path_t LocalizedPlugin::getNativeLangFile() const {
4646
path_t path;
4747
if (editor().windowHandle() != 0)
48+
// portable installation ?
4849
path = pluginsHomeDir().parent_path() / path_t(L"nativeLang.xml");
50+
if (!std::filesystem::exists(path))
51+
// system-wide installation ?
52+
path = pluginsConfigDir().parent_path().parent_path() / path_t(L"nativeLang.xml");
4953
return path;
5054
}
5155
// --------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)