167

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.

clamp
  • 1,282

6 Answers6

222

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.

antzshrek
  • 568
Rob3C
  • 358
37

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++ 
random
  • 15,201
8

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.

Marek
  • 258
  • 1
  • 5
  • 13
3

The other answers did not work for me.

Uninstalling and reinstalling npp did the trick.

nimcap
  • 1,706
0

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.

integris
  • 121
0

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.

slhck
  • 235,242