Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I open NotePad++ the following error message appears:

Load langs.xml failed!

That obviously means that there is also no syntax highlighting.

My OS is Windows 7 64-bit.

share|improve this question
Strangely, I had the same problem. And the interesting thing was the highlighting worked when I selected the language manually. Anyways, the accepted answer seems to fix the problem completely. – anand.trex Dec 21 '09 at 17:24
This happens to me occasionally. And I lose my settings as well. This is going for a few years at least. – Halil Özgür Sep 27 '12 at 6:27
It happens occasionally. Each time I follow the steps in the accepted answer, but it's still annoying. In my latest attempt, I denied myseld write rights to langs.xml, so hopingly the file doesn't get truncated now. – GolezTrol Feb 3 at 8:47
up vote 210 down vote accepted

Somehow, your langs.xml has errors in it. Perhaps while exploring various Notepad++ options you accidentally made unintended changes to it. That's what happened to me.

Go to the installation folder for Notepad++ and rename langs.xml to langs.xml.bad. Then, in that same folder, find langs.model.xml, make a copy of it, and rename the copy to langs.xml. DO NOT simply rename the file or you will not have it available the next time you need it.

also replace this file in the folder "C:\users(user)\appdata\roaming\notepad++"

You will want to then compare the langs.xml to langs.xml.bad and see if there is anything legitimate that you want back.

If you are missing the langs.model.xml file, you can download the current version from the svn repo.

share|improve this answer
Worked here, too. As an aside, I'd mention the fact that my langs.xml file had no "errors" as such.. it was blank! Size, zero. Sadly, I wasn't able to reproduce the behaviour which caused it to be wiped clean. – TataBlack Dec 14 '09 at 15:28
Me too. Zero, too. – PA. Dec 14 '09 at 15:43
My langs.xml looked like it had been truncated after like the 30th line for some reason. Rob3C's fix worked great! – Hardwareguy Jan 23 '10 at 17:15
Mine was zero too. Are all you zero-byte file guys on Windows 7 x64, perchance? I wonder if there's a Notepad++ bug around this. I swear I haven't mucked around with the settings.. – Blorgbeard Jan 26 '10 at 20:07
Mine was zero length too. Windows 7, x64. – Andrew Mar 14 '10 at 8:41

I had the same problem but I had to replace the langs.xml in the following path to fix it.


For those on a current Windows release:

share|improve this answer
This worked for me. The file had been truncated, so was invalid XML. – JV01 Jan 12 '11 at 10:01
This one worked for me, Windows7 64bit. In the installation folder (C:/Program Files(x86)/Notepad++ was the langs.model.xml but no langs.xml. Thanks – Alfabravo Jul 5 '11 at 14:54
Same here. First tried the accepted answer. There was no langs.xml in the install folder, but there was in this roaming directory. Suggest first finding which situation fits you by locating the corrupted langs.xml, then copying the model into its place. – Robert Kerr Nov 16 '11 at 1:00
This worked for me. I used Notepad++ zip version (rather than installer). I think installer ensures existency of xml files is Roaming directory, so without installer one has to copy them manually. It has nothing to do with XML corruption. – Tomáš Záluský Aug 26 '15 at 19:24

I had the same error message, but a different issue - the langs.xml file was OK. Replacing it with langs.model.xml did not fix the problem.

To fix the problem, I had to open langs.xml in Notepad++ (running as Admin on Windows7 to be able to save in ProgramFiles). Then, from the Encoding menu, I saw the file is saved as ANSI. The XML declaration specifies 1252 charset. So I re-encoded the file by selecting Encoding -> Character sets -> Western european -> Windows-1252. Then I made a small change to the file and re-saved it.

I suspect this is related to the default codepage of the system.

share|improve this answer

The other answers did not work for me.

Uninstalling and reinstalling npp did the trick.

share|improve this answer

This answer was taken from a rejected edit and it was not written by me:

Not a full proof solution as it can happen again.

"Do not use environment variable %APPDATA%" can be selected on Windows 7 installations, but seems to be ignored. Langs.xml seems to always be put in %APPDATA%. (Is this confusion the cause of the bug?)

Copy the new %APPDATA%\Langs.xml to %APPDATA%\Langs.model.xml and put a copy in Program Files\Notepad++.

Copy %APPDATA%\Langs.model.xml or ProgramFiles\Notepad++\Langs.model.xml to %APPDATA%\Langs.xml if the problem occurs again – not foolproof but it's a workaround.

A foolproof solution would be to fix the bug causing Langs.xml to be corrupted.

share|improve this answer
No, the file will never be placed directly under %APPDATA%, instead it may be in the %APPDATA%\Roaming\Notepad++ folder, or in the root folder of the application. Also, you suggest to copy the broken langs.xml on top of langs.model.xml. do not do that, it will break permanently, instead, copy the other way around, as suggested in the accepted answer and leave the langs.model.xml, which is untouched, where it was. – Abel May 15 '14 at 12:50

I got this error when I used the ZIP version (no installer). Renaming files and reinstalling did not work for me.

Try running the exe with "Run As Administrator" and then say Yes when it asks to fix the config.xml file. This worked for me.

share|improve this answer

You must log in to answer this question.

protected by Jeff Atwood Jun 7 '10 at 6:45

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .