In a network install, sites may be using a different locale. How can I get a list of all sites using a given locale? For example ja

I tried using WP_Site_Query but this didn't work. For example

$query = WP_Site_Query( ['lang_id' => 'ja'] );

  • In the documentation, it says that the lang_id is an int, not a string. – Pat J Oct 2 at 22:22
  • @PatJ that is the reason why my attempt failed. also, the lang_id field in the wp_blogs table isn't actually used – henrywright Oct 2 at 22:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.