Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing issues with translating the English version of the product list on their WooCommerce shop. The filter appears in English, but the footer and "details" buttons do not. The footer consists of different strings, texts, and links. While the English front page displays correctly, the WooCommerce shop products page does not show the correct translations in the footer, and the "details" button is still in Danish.
Solution:
If you're experiencing similar translation issues with your WooCommerce shop using Oxygen templates, we recommend you follow these steps:
1. Update all WPML plugins.
2. Update the Oxygen plugin.
3. Update WooCommerce plugins.
4. Navigate to

WPML-> Settings-> Post Type Translation

.
5. Set the "Templates (ct_template)" post type to

Translatable – use translation if available or fallback to default language

.
6. Go to

Oxygen-> Templates

.
7. Translate the templates.
For more detailed guidance on translating Oxygen templates, please check our guide: Translating Oxygen Reusable Elements & Templates.

If this solution doesn't seem relevant to your issue, please don't hesitate to open a new support ticket. You can do so by visiting our support forum.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by Osama Mersal 1 year, 5 months ago.

Assisted by: Osama Mersal.

Author Posts
January 17, 2024 at 11:01 am #15194197

thomasG-89

We are having problems translating the english version of the product list on our shop:
hidden link

It seems like the shop understands that the page is in english some of the places and some not. The filter is in english and so on, but the footer and the "details"-buttons are not.

January 17, 2024 at 11:16 am #15194307

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Please try the following steps:

1- Go to WPML-> Theme and plugins localization, select your theme/plugin, and scan
2- Go to WPML-> String Translation
3- Scroll down and click on the "Translate texts in admin screens »" link
4- Search for the needed strings
5- Select the strings
6- Click on the "Add to String Translation" button
7- Then click on the "« Return to String Translation" link
8- Translate the strings, clear the cache, and check the front end

Kindly check our guide to know more about translating texts in the admin texts screen. (https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/)

Best regards,
Osama

January 17, 2024 at 12:56 pm #15194965

thomasG-89

It didnt help. It might have helped with the "details" button, but it didnt find it.
But the whole footer is not a string, this is different strings and texts and liks and so on.

If you take a look at the english frontpage: hidden link
You will see that everything is working correct with the correct translations in the footer, based on the english version of the Oxygen-template.

But on the Woocommerce shop products page it is only working in the header, and not the footer. They should be in the same template.

And the details button is still showing in danish.

Udklip.PNG
January 17, 2024 at 1:01 pm #15195015

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for your update. I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I would need your permission to de-activate and re-activate the Plugins and the Theme and change configurations on the site. This is also a reason the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

January 18, 2024 at 8:11 am #15198422

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

Thanks for the access details. I installed a local copy of your site and was able to fix the issue by the following steps:

1- Update WPML plugins
2- Update Oxygen plugin
3- Update WooCommerce plugins
4- Go to WPML-> Settings-> Post Type Translation
5- Set the "Templates (ct_template)" post type as "Translatable – use translation if available or fallback to default language"
6- Go to Oxygen-> Templates
7- Translate the templates

Kindly check this guide to know more about translating Oxygen templates. (https://wpml.org/documentation/plugins-compatibility/oxygen-visual-builder/#translating-oxygen-reusable-elements-templates)

Best regards,
Osama

January 18, 2024 at 8:36 am #15198535

thomasG-89

Thank you. But this really isnt working for me. I ended up with a blank page and couldnt fix it. I have set the page back to the backup at midnight.

Is there any chance you can fix both of the issues at the live site?

January 18, 2024 at 9:29 am #15198863

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

1) I translated the button via WPML-> String Translation. (hidden link)

2) I translated the main and product templates. Please check if the shop page works correctly in English. (hidden link)

Kindly check this guide to know more about translating Oxygen templates. (https://wpml.org/documentation/plugins-compatibility/oxygen-visual-builder/#translating-oxygen-reusable-elements-templates)

Best regards,
Osama

January 18, 2024 at 9:50 am #15198996

thomasG-89

Yeah I see. The translations are fixed, but now the product details pages are not working anymore: hidden link

This is both in english and danish.

January 18, 2024 at 10:03 am #15199044

Osama Mersal
WPML Supporter since 02/2020

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hi,

The error on the page is related to the "Oxygen Elements for WooCommerce" plugin. Kindly check the following log.

Fatal error: Uncaught TypeError: str_contains(): Argument #1 ($haystack) must be of type string, array given in /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/shortcodes.php:246 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/shortcodes.php(246): str_contains(Array, '[') #1 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen-woocommerce/elements/product-builder.php(106): do_shortcode(Array) #2 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/api/oxygen.element.class.php(138): Oxygen\WooElements\ProductBuilder->render(Array, Array, Array) #3 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/includes/templates.php(76): OxygenElement->shortcode(Array, Array, 'oxy-product-bui...') #4 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/components/classes/section.class.php(70): do_oxygen_elements(Array) #5 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/includes/templates.php(76): CT_Section->add_shortcode(Array, Array, 'ct_section') #6 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/includes/templates.php(109): do_oxygen_elements(Array) #7 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/includes/templates.php(183): ct_template_output() #8 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/class-wp-hook.php(324): ct_templates_buffer_start('') #9 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters('', Array) #10 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #11 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/component-init.php(1272): do_action('ct_builder_star...') #12 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/class-wp-hook.php(324): oxy_print_cached_css('') #13 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #14 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #15 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/general-template.php(3052): do_action('wp_head') #16 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-content/plugins/oxygen/component-framework/oxygen-main-template.php(10): wp_head() #17 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/template-loader.php(106): include('/Applications/X...') #18 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-blog-header.php(19): require_once('/Applications/X...') #19 /Applications/XAMPP/xamppfiles/htdocs/fshmachines/index.php(17): require('/Applications/X...') #20 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/fshmachines/wp-includes/shortcodes.php on line 246

On my local installation, the issue also happens when the fix is reverted. Would you please consult the Oxygen support regarding this issue?

Kindly let me know their findings and if we can help fix this issue.

Best regards,
Osama