WPML problem
-
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_K1I1PhThanks!
-
Hi,
Could you please send a link to your site so I can have a look?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!
Hello again,
I haven’t heard from you for a weak. Do you see the problem? Is there any solution?
Thanks!
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.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!
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.Hello,
Thanks for the help. My issue is solved!
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?
-
This reply was modified 1 year, 11 months ago by
giannisdigitup.
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?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-CfKNsBCThe string in the circle is Greek. We can not understand why this is happening.
Thanks!
-
This reply was modified 1 year, 11 months ago by
giannisdigitup.
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.Hello,
I just created the ticket with the same email as this account has.
Thanks!
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.Hello Louise,
Thanks for the update. We will wait for the new version of the plugin.
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!
-
This reply was modified 1 year, 11 months ago by
The topic ‘WPML problem’ is closed to new replies.