• Resolved giannisdigitup

    (@giannisdigitup)


    Hello,

    We are having a two language e-shop and we use wpml for the translations. We are facing a problem with trasnlating the plugin strings using WPML. Also another strange thing is that when a user is logged in the strings are in Greek both in the Greek and English site, and when a user is logged out the strings are in English Greek and English site. Is it possible to translate the plugin strings using WPML?

    https://prnt.sc/6XWf9gkVjJem
    https://prnt.sc/Ekbir_K1I1Ph

    Thanks!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi,

    Could you please send a link to your site so I can have a look?

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello,

    This is a product page https://www.nashbyna.com/tiffany-nude-dress/. We also have enabled it to the checkout page. You can also check it out there.

    Thanks!

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello again,

    I haven’t heard from you for a weak. Do you see the problem? Is there any solution?

    Thanks!

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi,

    The language in the Klarna On Site Messaging widget is based on the customer country, we have a filter here to force the locale to a specific country that you can try out.?

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello,

    Is the same filter valid for the checkout page strings? If i am correct they are not mentioned as On Site Messaging from the plugin.

    Thanks!

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi,

    If you would like to also force locale to a specific country and language in the Klarna Payments method in the checkout you can use this filter.

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello,

    Thanks for the help. My issue is solved!

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello again,

    We managged to solve the problem using WPML filter to get the current language of the page. The solution you provided does what we asked for but it is not working on Safari browser in the checkout page. This are the snippets we have added in order to work.

    add_filter('kosm_locale', function($locale) { //this works on Safari
    $my_current_lang = apply_filters( 'wpml_current_language', NULL );
    if($my_current_lang == 'el'){
    return 'el-GR';
    }else{
    return 'en-GR';
    }
    });


    add_filter('kp_locale', function($locale) { //this doesn't work on Safari
    $my_current_lang = apply_filters( 'wpml_current_language', NULL );
    if($my_current_lang == 'el'){
    return 'el-GR';
    }else{
    return 'en-GR';
    }
    });

    Any idea how to fix it?

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi,

    These filters are running on the server so it should not matter what browser you are using, does it work now in the checkout when using your custom filter for kp_locale?

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello,

    In the Greek version of the checkout page we can see the string in Greek as it sould be.

    In the English version we can see the string but again in Greek. Here is the screenshot:
    https://prnt.sc/r-rG-CfKNsBC

    The string in the circle is Greek. We can not understand why this is happening.

    Thanks!

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Hi,

    To move forward with this we need to take a look at what data we send to Klarna via the Klarna Payments plugin log, but this information is private and should therefore not be published in a public forum like this. Would it be possible for you to create a Krokedil support ticket here so we can troubleshoot this further?

    When we have a solution/cause of the issue we will also post it in this forum thread to keep this thread updated.

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello,

    I just created the ticket with the same email as this account has.

    Thanks!

    Plugin Support louisekrokedil

    (@louisekrokedil)

    Here is a summary of the issue and solution:

    When the language was changed in the checkout the locale was updated correctly and we could confirm that in our logs. When we changed from Greek to English the locale was updated from el-GR to en-GR correctly but only the title in Klarna Payments was updated to English. The description was still in Greek even though the locale was updated.?Klarna have now made changes to fix this but we as developers of the plugin still need to add support for these changes in the Klarna Payments for WooCommerce plugin. We have created an internal task to build this but I can unfortunately not give you an estimate since it is not yet planned.

    Thread Starter giannisdigitup

    (@giannisdigitup)

    Hello Louise,

    Thanks for the update. We will wait for the new version of the plugin.

    Plugin Contributor Kristi at Klarna

    (@klarna)

    v3.8.3 was released 2024-Nov-12 with:

    “Tweak – If the locale is modified, the existing session will be dropped, and a new one will be created. This should ensure that Klarna has the correct locale, and improve compatibility with i18n plugins.”

    Please update (ideally first in a non-production environment) and retest, and share feedback.

    Thank you for the patience for this update!

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