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.

In my plugin I print out the current locales via

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

    var_export($originalLocales);die;

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

1 Answer 1

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

 
discard

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.