• Our website is in English and we will be keeping it like that. But we are thinking of having 2 buttons on the Cart page: “Checkout in English” and “Checkout in French”. So basically only the checkout pages would be in English and French. Is this doable?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Niels Lange

    (@nielslange)

    Hello @wrip ??

    It’s possible to have the checkout page available in English and French. You could achieve this as followed:

    1. Install and activate the Polylang plugin
    2. Define English as the default language
    3. Add French as additional language
    4. Duplicate the English checkout page
    5. Add the shortcode [woocommerce_checkout] to the French checkout page

    Adding an additional button to the cart page to allow customers to choose if they want to access the English or French checkout page requires customer code, though.

    On the following page you can find a code snippet to add an additional button to your cart page. Please note that we do not offer support for custom code and that we cannot guarantee if the code works as expected. Perhaps you could contact one of our recommended WooExperts to see if they can help assist you with something like this.

    Rynald0s

    (@rynald0s)

    Automattic Happiness Engineer

    Hi @wrip!

    What @nielslange said ^ ??

    Cheers!

    • This reply was modified 4 years, 5 months ago by Rynald0s.
    Thread Starter wrip

    (@wrip)

    @nielslange Thanks for your reply. We’ve decided to do this in a different way as we already have too many plugins installed and don’t want to add another one.

    We’ve simply added French translations next to the English text on Cart and Checkout pages by creating woocommerce-en_US.po and woocommerce-en_US.mo files with PoEdit. That seems to work well for us. One question related to this. When WooCommerce is updated, will it overwrite or remove the .po and .mo files?

    Plugin Contributor Niels Lange

    (@nielslange)

    We’ve decided to do this in a different way as we already have too many plugins installed and don’t want to add another one.

    I understand your concern. I hope it’s not related to the fact that some people say that too many plugins will slow down a site. This is a very common misconception. It’s not the number of plugins but the quality of every individual plugin that impacts the performance of a site. You could have 100 very well written plugins and therefore a very fast site or one poorly written plugin and therefore a slow site.

    We’ve simply added French translations next to the English text on Cart and Checkout pages by creating woocommerce-en_US.po and woocommerce-en_US.mo files with PoEdit. That seems to work well for us. One question related to this. When WooCommerce is updated, will it overwrite or remove the .po and .mo files?

    While this fix sounds tempting, you’ll indeed lose the translation with the next WooCommerce release. A better approach would be to keep the adjusted translation file separately. You can find a detailed explanation on how to achieve this on https://docs.woocommerce.com/document/woocommerce-localization/#section-8

    Thread Starter wrip

    (@wrip)

    @nielslange Thanks, that worked. I just wanted to clarify one more thing. I’ve tried adding the .po and .mo files in both these locations: wp-content/languages/woocommerce and wp-content/languages/plugins. They both seem to work fine. Is any of these locations okay?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Translation: Is it possible to set up a separate checkout page?’ is closed to new replies.