0

I have been trying to figure this out but seems that there is no way to do it, and I don't want to use WPML, I have been using it and it's super heavy and buggy. So, the question is ... Is there a hack to change the Woocommerce .mo language file on a multisite install ? In my case, this is a multisite with the same site but cloned on different languages / world locations. I have done it with all the english sites and implemented their href langs, but now it's time to add non-english languages and while you can change the language of the site, Woocommerce won't let you do it. Is there a clean way to do this without using WPML or other dirty and heavy plugins ?

10
  • Could you elaborate on what exactly you are trying to accomplish? Is it correct that you have a multisite install with several sites, and that you want each of this sites to use a different language? What have you tried yourself so far, and what did and didn't work?
    – engelen
    Mar 26, 2016 at 17:09
  • Well, I think my question is pretty clear. I have tried to change Woocommerce language from English to Spanish on one of the subsites, and I can't change it because there is not an option to change a subsite Woocommerce .mo file. So, the question is ... how to change the system language of Woocommerce of a subsite on a multisite installation ? I want the language changed, not the product translations or anything else. Just the language. Default text on Woocommerce buttons, cart, etc will show on the Spanish version instead of English.
    – xavier
    Mar 26, 2016 at 18:17
  • Ah, that makes your question more clear! Have you tried changing the website language in the admin settings screen General -> Settings? This should determine per-site which language files to use.
    – engelen
    Mar 26, 2016 at 18:42
  • Yes, I have done that already, but it does not changes the Woocommerce language, it remains on English. I have downloaded already the .mo translation file from Woocommerce translate project but there is no way to configure it on multisite. Maybe hardcoding it or something ?
    – xavier
    Mar 26, 2016 at 18:46
  • Hmm, that's strange. Are other pars of the site translated into Spanish when you set the language in the settings screen to Spanish?
    – engelen
    Mar 26, 2016 at 18:47

1 Answer 1

1

For WooCommerce to support any language other than the default (US English), you have to make sure of the following — it doesn't matter whether you're on a multisite or single-site install:

  1. In the general settings screen (Settings -> General in the admin panel), the Site language should be your desired language. In your case, you should select Español. This changes the language WordPress uses to Spanish.

    enter image description here

  2. The localization file (.mo) for WooCommerce should be in the correct folder. For WooCommerce, this is wp-content/langauges/woocommerce. The file name is woocommerce-[locale].mo. You can download the .mo-file for your language on WordPress.org. Click on the percentage in the Stable column for your language and export the language .mo-file on the bottom of the page (.e.g https://translate.wordpress.org/projects/wp-plugins/woocommerce/stable/es/default).

    enter image description here

    The downloaded file should be renamed and placed in the aforementioned folder, yielding wp-content/languages/woocommerce/woocommerce-es_ES.po in your case.

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.