WPML support in PRO and X

Hi,

When I add a product to the cart in a secondary WPML language and then try to access it I get this code instead of the translated cart page:

[cs_element_column _id=“3”][cs_element_text _id=“4”][/cs_element_column]

You can try to add this translated product here https://event.speedskating.link/toolbox/time-saver-plan-3-month/?lang=ru and see what will happen if you click the cart then.

And another question is how to be with titles defined inside Theme Customizer like Bolg title, Shop title, Portfolio lables etc.?

Hi there,

Please check this https://www.dropbox.com/s/5oq0a5f7s2fd852/CornerstoneTranslation.mp4?dl=0 for proper translation. What you’re doing it translating them part by part instead of creating dedicated pages for each language. It doesn’t work that way since shortcode could contain untranslatable content, it still best to create pages for each language and edit each from the builder.

@sportceneter, they are database entries and not static strings. https://wpml.org/forums/topic/theme-calls-string-from-db-how-translate/, it requires a bit of change since strings from the database are different from site to site. Which stack you’re on? Each stack could have different database field naming for titles. Sample is this

add_filter('x_option_x_renew_blog_title', 'enable_blog_title_translation' );
function enable_blog_title_translation ( $title ) {
return __( $title, '__x__' );
}
```

then translate it through language files or plugin. Or simply add your translation directly

```
add_filter('x_option_x_renew_blog_title', 'enable_blog_title_translation' );
function enable_blog_title_translation ( $title ) {
return 'THIS IS BLOG TITLE';
}
```

Thanks!

Hi @Rad!

I am using Renew stack for that site.

Hi there,

Have you implemented the suggested code in your child theme’s functions.php? Please provide a sample URL where you implemented this.

And about the translation of those shortcodes, please use classic elements instead. You may able to translate them.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.