Trying to find where are saved the Disabled Languages from Preferences (File)
-
Hi everyone, I are trying to disable Languages like disabling them from the Context Menu in -> Configuration -> Preferences -> Language, but instead, from a File, replacing the file in some folder of Notepad++, but I have some questions:
- Where is the File where the changes are reflected when I disable a a Language via the Context Menu ?
- What is the File Name of the changed File I previously mentioned ?
- Can I replace that File (If exists) with a custom one with the specific languages I want to use?
Thanks in advance !
-
@Sebastián-Dianessi, Welcome to the Notepad++ Community. You asked some interesting questions
I had never played around with disabling languages before, so I didn’t know the answer. But I saved a copy of the various XML settings files for Notepad++ (found in
%AppData%\Notepad++\*.xml
for normal installations), and did a diff after disabling a few of the languages.I found that one of the lines in
config.xml
changes, in the<GuiConfigs>
section:- normal condition:
<GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" gr8="0" gr9="0" gr10="0" gr11="0" gr12="0" langMenuCompact="yes" />
- other condition
<GUIConfig name="langsExcluded" gr0="0" gr1="0" gr2="0" gr3="0" gr4="0" gr5="0" gr6="0" gr7="0" gr8="0" gr9="0" gr10="28" gr11="0" gr12="0" langMenuCompact="yes" />
So, for me, the
gr10
attribute changed. I had disabled the last three languages in the Available Items list in the Preferences > Languages dialog. The number 28 in binary is00111000b
. I am guessing that those three 1’s are the three disabled languages… but it’s hard to tell from that first experiment how things map. (But it makes sense: I had 83 entries in the Available Items, so assuming 8 bits pergr##
, it would be bits 80,81,82… which would fall into the 10th 8-bit value.) To identify which language goes into which bit of the 13gr##
attributes, someone (ie, you) would have to do some experimentation, or dig into the source code at https://github.com/notepad-plus-plus/notepad-plus-plus, and see if you can determine how it maps language togr##
and the value. - normal condition:
-
Hello, @sebastián-dianessi, @PeterJones and All,
As I recently built up some files, related to source files of N++
v7.7.0
for @IvyNo ( see below ) :https://notepad-plus-plus.org/community/topic/12576/list-of-all-assigned-keyboard-shortcuts/16
I attempted to verify that N++ manage
83
languages, includingNormal Text
because I’ve personally counted82
from my files ! And it happens that theJavaScript
language seems to be present twice, in two different locations, inside the Available Items area when choosingSettings > Preferences... > Language > Language Menu
!?Then, having a look, on the right, to the
Tab Settings
list, sorted alphabetically, I noticed the two consecutive itemsjavascript
andjavascript.js
! At first sight, as I’m not a specialist of Java, I can’t tell you what’s the difference between them ! But this certainly explained the duplicateJavaScript
items in the Languages list !Best regards,
guy038
-
@guy038 said:
I noticed the two consecutive items javascript and javascript.js
I think this also harkens back to the
functionList.xml
having two entries (L_JS=19 and L_JAVASCRIPT=58)I’m not a specialist of Java,
Obviously not ☺, since you made the common mistake of confusing Java and JavaScript (or you made a typo).