• Resolved jahau1234

    (@jahau1234)


    I’ve already downloaded and installed translations of woocommerce to wp-content/languages/plugins but it’s not being loaded. What could be the problem?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello
    There could be a number of issues.
    It is possible that the .mo files are not complete and to not have all the strings that you expect to have.
    It is also possible that the locale is different from the expected file name, and thus that you are not loading the proper files.
    Usually WordPress automatically downloads these .mo files, but if you have done that by hand, then make sure that the file looks like in example: woocommerce-es_ES.mo for Spanish.

    Thread Starter jahau1234

    (@jahau1234)

    Actually, in this case it was the theme (flatastic).

    Actually, in this case it was the theme (flatastic).

    I assume that you fixed the problem then?

    The .mo file for themes should go to a separate folder – /wp-content/languages/themes/
    and should be named by the theme domain name that is used – in example “twentyseventeen” for Twenty Seventeen and then suffixed by the language code- in example: twentyseventeen-es_ES.mo for Spanish

    Thread Starter jahau1234

    (@jahau1234)

    Yes, it’s solved now. The theme had WooCommerce template files included and had replaced all the ‘woocommerce’ constants with their own (don’t ask me why this was done). Now in child theme I took the ‘woocommerce’ constant in the template files back in use as suggested by the theme team and the translations are working now.

    The logic introduced in the theme is not any more overwritten in the WooCommerce reg. loading of mo-files because it’s back to its own domain (where it should be). Theme had it’s own logic for overload_textdomain_mofile / load_textdomain_mofile.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Doesn’t load existing mo-files’ is closed to new replies.