We have found a typo with one of our language codes. We already have content within that language, but would it be possible to update the language code without having to delete/remove the language and then reading it back in?

WE are unable to find a good way to do modify just the language code..

1 Answer 1


I'm not sure if this will work, so BACK UP YOUR DATABASE FIRST, but I think that you should be able to run the following query to change fix it:

Let's say for example you were wanting to use Japanese. The language code is 'ja', but people often mistake it as 'jp'. If this was your case, and you wanted to change 'jp' => 'ja', you can run the following query:

UPDATE locales_target SET language = 'ja' WHERE language = 'jp'

Then clear your cache.

If this doesn't work, return your database to its previous state using the backup you took at the start (because you took a backup, right?!)

  • @Jaypen When we tried running that query we found that all the current pages went from jp to undefined so for some reason it did not update current languages. The only other solution we have found was to create another language with the appropriate settings and the bulk update the language for the nodes, but that requires a different level of effort we are trying to avoid. is the solution you proposed working your local db? Commented Oct 17, 2016 at 20:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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