• Hello,

    My website language is french but for customer the site is in english. It works fine but when a customer makes an order, he receives its confirmation email in english which is ok but in the same time, order notes (mainly status changement) are stored in english whereas I would like they will be stored in french.

    Will you have an idea to face this behavior?

    Thanks a lot.
    Best regards.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there, @bourgesloic! Thanks for contacting us. I’m happy to help you.

    To confirm if I understood the issue correctly: Your website is in French, but your customers can see it in English.
    If the customer sees the site in English, they will get the order confirmation in English.
    But then your order notes are in English too.

    Do all customers see it in English, or is your website multilingual?
    If it is multilingual, when a customer who sees it in French completes an order, do the order notes also show in English?

    Do you have any plugins that are interfering with the language?

    Is there anything else on the site that is also in English for you?

    Can you please share a screenshot of what you see on Settings > General and also on Your Profile settings?
    Please remove any sensitive information before sharing.
    I recommend using https://snipboard.io. You can share the direct link to the image as a response to this topic.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter bourgesloic

    (@bourgesloic)

    Hello @carolm29

    Thanks for your quick answer. To be precise, my website is multilingual. I change the locale for visitors through the filter ‘locale’, not through a plugin (see my test site: https://test-brm.dev.boat-rental-manager.fr/)

    And yes, your understanding is correct: when a vistor selects a foreign language (other than french), and make an order, he receives confirmation email in its selected language. But in the same, all orders notes added to the order are in the same language (english, deutsh…). See admin screencap: https://snipboard.io/A8PTc3.jpg

    In general settings, language is setted to French. All admin users also (see https://snipboard.io/QqmbRn.jpg and https://snipboard.io/pw7xKj.jpg)

    At this stage, I have found a way to avoid this behavior: for all languages, I have overrided some admin messages in foreign languages to french language through gettext filter. But it would be better if there is another solution.

    Best regards.

    Hey, @bourgesloic!

    Thank you for the information.

    I’m glad you were able to find a workaround, but let’s investigate to see what is causing the issue.

    ?I change the locale for visitors through the filter ‘locale’, not through a plugin?

    I see the filter on the website, but do you mind sharing how did you set it up on the backend?
    When we know how the multilingual is set up, we will be able to guide you in the right direction. ??

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter bourgesloic

    (@bourgesloic)

    Hello,

    I have a function linked to ‘locale’ filter which changes locale if not in admin (the function get_cookie_stored_user_locale returns customer locale).

    public function set_locale($locale) {
        if ( is_admin() && ! wp_doing_ajax() ) {
            return $locale;
        }               
        return $this->get_cookie_stored_user_locale();
    }

    I hope it helps you to better understand how it works.

    Best regards.

    Hey, @bourgesloic!

    Thanks for clarifying how you set up the filter!

    Since you are using custom code to set this up, we can’t provide support as per our support policy, but we do our best to offer advice and direct you to appropriate resources.

    You can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.