'Load langs.xml failed!' Message When Opening Notepad++

Unless you actually like the plain, old, boring Notepad (which basically hasn't changed since 1985) - then you're probably already aware of a great replacement for it, called Notepad++.  To put it short, it's an amazing little text editor with a feature as long as my arm, including syntax highlighting for virtually every scripting language you can think of.  It also has integration into Windows Explorer, so it's easy to right-click and edit files which are not associated directly to Notepad++.

For years, it has never let me down, and while it still continues to serve faithfully, this week the following message started to appear every time I opened it on my 64bit Windows 7 workstation:

Configurator
Load langs.xml failed!
OK

That obviously also means that I lost my syntax highlighting.  I could get it back, but I had to manually select the type of file I was editing.  Normally this is automatic.

Somehow, the langs.xml had errors in it. Perhaps while exploring various Notepad++ options I accidentally made unintended changes to it.  I don't know, but when I went to the Notepad++ installation directory, the langs.xml file had a file size of 0 bytes.

So while in the installation folder for Notepad++ I renamed langs.xml to langs.xml.bad. Then, in that same folder, I copied langs.model.xml, and renamed the copy to langs.xml.

This fixed this problem for me, hopefully it will work for you as well. You may want to then compare the langs.xml to langs.xml.bad and see if there is anything legitimate that you want back - but in my case It was fairly obvious that the langs.xml file was pretty useless in it's 0 bytes state.

14 Comments

  1. Martin Matysiak
    Dec 05, 2009 @ 20:16:18

    Thanks a lot!

    Your solution seems to work :-) Same system, Windows 7 x64. Google is really fast, I see that your entry has been published yesterday and today I already found it.

    Reply

  2. neobie
    Dec 16, 2009 @ 23:29:47

    I thought it was my problem as I recently use hibernation. Seem like it is not.
    My solution is to uninstall and install again, but after 1 or 2 days the problem just come back again.

    I downloaded the latest notepad++ but it didnt solve this stupid problem either.

    Hopefully your solution would last long.

    Reply

  3. Benny Neugebauer
    Dec 19, 2009 @ 11:21:00

    Works fine. Thanks a lot!

    Reply

  4. Ash
    Dec 20, 2009 @ 18:34:51

    Yeah I tried the reinstall too, but it didnt work at all. Interestingly, it also added a second context menu item, but thats not a big deal. I know this worked for me (and obviously Martin) I hope it works for you.

    Reply

  5. Ash
    Dec 20, 2009 @ 18:37:42

    Thanks for the feedback, and I am glad it worked for you.  It’s also cool to know that you found it on Google that quickly, I didnt know that Google indexed my site that quickly.

    Reply

  6. Ash
    Dec 20, 2009 @ 18:38:28

    Np, glad I could be of assistance.

    Reply

  7. Narendra Pandya
    Dec 23, 2009 @ 07:00:07

    The way it worked for me was i had to copy the langs.xml file from program files notepad++ and place it in %appdata%notepad++
     
     
    Thanks for the direction and help.. Good work.

    Reply

  8. sehana
    Jan 17, 2010 @ 02:10:06

    Hmm I tried it, but it didn’t work for me. The one about copying it to appdata/notepad++ didn’t work for me either.

    Reply

  9. Ash
    Jan 17, 2010 @ 12:10:00

    Perhaps try uninstalling Notepad++, and then delete any and all instances of the notepad++ application data (especially any langs.xml files) and reinstall it.

    Reply

  10. corical
    Jan 21, 2010 @ 06:32:54

    Thank, this also resolved my highlighting.

    Reply

  11. Ash
    Jan 21, 2010 @ 08:30:05

    Glad to be of assistance. :P

    Reply

  12. Jaap
    Jan 25, 2010 @ 19:54:41

    Whit me langs.xml was empty.
    Deleting langs.xml forced notepad++ recreate the original.

    Reply

  13. kometbomb
    Feb 26, 2010 @ 20:54:50

    I just manually replaced the file for the fifth time this week (because I have had to reboot more than usual) and decided to give up hope on ever getting fixed. I simply created a batch file to copy the langs.model.xml over the 0-length file and then execute Notepad++.exe.

    Note that if you make changes in langs.xml, you need to keep in mind it will be overwritten next time you click the batch file. Also, this will open an extraneous cmd.exe window but it will do until the devs fix the bug.

    Here’s the notepad++.bat contents:

    @echo off
    copy /y “C:Program Files (x86)Notepad++langs.model.xml” “C:Program Files (x86)Notepad++langs.xml”
    cd “C:Program Files (x86)Notepad++”
    Notepad++.exe

    Reply

  14. Ash
    Feb 26, 2010 @ 23:01:56

    This is a very innovative solution to this issue.  Thanks for posting it.

    Reply

Leave a Reply