Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to add a function in my theme to change the local language for certain pages.

function nfo_redefine_locale($locale) {
  global $locale;
  $locale = 'de_DE';
  return $locale;

But it doesn't seem to be working, the language remains the one defined in wp-config.php?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.