Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

---------------------------
Configurator
---------------------------
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
3  
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
add comment

5 Answers 5

up vote 197 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
24  
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
2  
Me too. Zero, too. –  PA. Dec 14 '09 at 15:43
1  
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
4  
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
3  
Mine was zero length too. Windows 7, x64. –  Andrew Mar 14 '10 at 8:41
show 15 more comments

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

C:\Users\<username>\AppData\Roaming\Notepad++

For those on a current Windows release:

%appdata%\Notepad++ 
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
add comment

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
add comment

The other answers did not work for me.

Uninstalling and reinstalling npp did the trick.

share|improve this answer
add comment

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 at 12:50
add comment

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

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.