Community
    • Login

    Trying to find where are saved the Disabled Languages from Preferences (File)

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 3 Posters 934 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sebastián DianessiS Offline
      Sebastián Dianessi
      last edited by Sebastián Dianessi

      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:

      1. Where is the File where the changes are reflected when I disable a a Language via the Context Menu ?
      2. What is the File Name of the changed File I previously mentioned ?
      3. Can I replace that File (If exists) with a custom one with the specific languages I want to use?

      Thanks in advance !

      1 Reply Last reply Reply Quote 0
      • PeterJonesP Online
        PeterJones
        last edited by PeterJones

        @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 is 00111000b. 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 per gr##, 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 13 gr## 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 to gr## and the value.

        1 Reply Last reply Reply Quote 3
        • guy038G Offline
          guy038
          last edited by

          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, including Normal Text because I’ve personally counted 82 from my files ! And it happens that the JavaScript language seems to be present twice, in two different locations, inside the Available Items area when choosing Settings > Preferences... > Language > Language Menu !?

          Then, having a look, on the right, to the Tab Settings list, sorted alphabetically, I noticed the two consecutive items javascript and javascript.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 duplicate JavaScript items in the Languages list !

          Best regards,

          guy038

          1 Reply Last reply Reply Quote 3
          • PeterJonesP Online
            PeterJones
            last edited by

            @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).

            1 Reply Last reply Reply Quote 1

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors