WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. 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

In my plugin I print out the current locales via

    $originalLocales = explode(";", setlocale(LC_ALL, 0));


Obviously the result is same as the WPLANGdefined.

However, I've grep all the wordpress ' code, I cannot find a single call via setlocale, so how WordPress is able to change locale without using setlocale?

share|improve this question

I would question "obviously" here. I get rather cryptic string C as result on my Windows machine.

Since WP isn't actually using native PHP functionality for any localization and handles it via core code, my best guess would be that is coming from server configuration in your case.

share|improve this answer

Your Answer


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

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