• Resolved pdgrzdv

    (@pdgrzdv)


    My Woocommerce is using a non-english language. In this case – Bulgarian.
    The translation files are located in /wp-content/languages/plugins and are named woocommerce-bg_BG.mo and woocommerce-bg_BG.po as they should be (following the Woocommerce guide).

    The site is working fine, everything is translated as it should be.

    Once I enable Comet Cache it stays fine for about an hour and after that the language settings revert to the default settings.
    The funny thing is that I can clearly see in the system status of Woocommerce that the “bg_BG” files are used but for some reason Comet Cache does not cache those.

    Is there a way to tell Comet Cache to check those folders as well before using the default Woocommerce language?

    Thanks! ??

    EDIT: Probably should mention that this website is not a multilanguage one. It’s supposed to be only in Bulgarian. Dynamic Version Salt shouldn’t be something I need.

    • This topic was modified 7 years, 5 months ago by pdgrzdv.
Viewing 3 replies - 1 through 3 (of 3 total)
  • @pdgrzdv I reviewed the WooCommerce source code to see how those language files are loaded and from what I can tell it should work just fine with Comet Cache page caching.

    Have you tried running another page caching plugin (e.g., WP Super Cache) to see if you run into the same issue? If so, then this sounds like a WooCommerce incompatibility (or bug) with WordPress caching plugins in general and you should check with them to see if it’s something that can be fixed.

    Comet Cache simply caches the output from WordPress. If WooCommerce loads the language translation files and outputs the content with the correct language, then that’s what Comet Cache will cache. If it outputs the content with the wrong language, Comet Cache will cache that as well. Comet Cache doesn’t ‘cache language files’ at all—it simply caches the output of WordPress.

    I hope this helps. Let me know if you have any other questions. ??

    Thread Starter pdgrzdv

    (@pdgrzdv)

    Thanks for your reply, Raam Dev!

    I actually fixed this issue. Haven’t tested other caching plugins that work exactly the same, but didn’t have any language reverts with W3 Cache. Still.. I like Comet Cache and wanted to make it work.

    For anyone else who might run into the same issue:

    By default Woocommerce inherits the language setting from WordPress, so if you’re not using the default (English) – switch back to it. This will make both your WordPress and Woocommerce in English. Then:

    1 – Locate the .mo and .po files that contain your language translation either from the Woocommerce language repository (or from your own source).
    2 – Upload them in wp-content/languages/plugins
    3 – Change the file names to woocommerce-en_US.mo and woocommerce-en_US.po

    You should be able to see your Woocommerce section changing into the language you’re trying to install and in System Status the Woocommerce plugin will be still displaying “en_US” language.

    Comet Cache is working properly with this little trick. Everything stays cached and doesn’t revert back to English.

    @pdgrzdv Thank you very much for sharing your solution! Glad to hear it’s working now. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Comet Cache ignoring woocommerce imported language files’ is closed to new replies.