Open dazzyon opened 8 years ago
@newkind I think this is duplicate to #887
@mahagr I don't think it's the same issue. The shortcodes also don't work for Custom HTML particles, where shortcodes are already supported.
I guess the problem is that the content of the particles doesn't get passed through the Wordpress translation function "__(...)".
When i add the translate(...) function (part of the Gantry framework) to the "filter" function inside Platform.php (the function that enables shortcodes for custom HTML particles if i understand it correctly), the language shortcodes work:
public function filter($text) { return translate(\do_shortcode($text)); }
Maybe there is an easy way to make this work for all particles?
Hi Dazzyon!
I´d like to know if you have got to solve this issue.
I'm doing the translation of a web made with Isotope theme wordpress. I wonder if it is possible to translate the content of the particles with which it works in Gantry 5. My problem is in how to translate texts that I have included in various Gantry particles, because it does not recognize as shortcodes.
Thanks.
Hi bhodeler,
I don't have a solution for the particles that don't support shortcodes unfortunately. By editing de Platform.php file as described above it only works for custom HTML particles.
Ok. Thanks a lot!!!
@bhodeler I created a pull request for the translate function in shortcode enabled particles.
I'm using the qTranslate-X plugin to create a multilingual site with Gantry 5.
Translating the following is without problems: Pages, Posts, Menu's, WooCommerce products.
The only issue i have is translating things inside the Gantry 5 particles. With qTranslate-X it's possible to use the following syntax to specify a text for different languages:
[:en]English Text[:de]Deutsch[:]
Even with the Custom HTML particle (process shortcodes enabled) this syntax is ignored (the full code like the example above is visible).
The strange thing is, when i add a widget particle (custom menu) and i set the title with the language tags, it works! When i do the same with another widget particle, the language tags don't work (full code visible).