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.
Elementor users - please update WPML to the latest version to maintain compatibility. More details here - https://wpml.org/changelog/2024/12/wpml-4-6-15-critical-update-for-elementor-sites/
Background of the issue:
I am trying to translate the 'locale' attribute from my shortcode from 'en' to 'de' to display my calendar in German. Using this config, the attribute appears in the ATE and is translated but ignored. pretty_google_calendar locale Link to a page where the issue can be seen: hidden link
Symptoms:
I expected to see the 'today' button in German. Instead, I got the 'today' button in English.
Questions:
Why is the 'locale' attribute being ignored despite being translated?
How can I ensure the 'today' button appears in German?
Our 2nd Tier Support checked and there is no way we can turn "off" shortcode translation for Elementor. So, it will always show the shortcode as translatable in the Advanced Translation Editor and you'll need to translate the entire shortcode to achieve what you need there.
However, if we use only the Gutenberg editor, hidden link , it works fine. I'm able to translate the "locale" parameter to de in German page here hidden link , check out the attached screenshot of the shortcode in the backend editor. But I'm not sure why the German page is still showing the English calendar. Could you check? Maybe we need to translate other parameters?
thank you for contacting 2nd Tier support and your update on this issue.
In your test-example, the gutenberg editor has problems with "newlines". I removed them and now the calendar is shown in german. and also wenn i update the english shortcode the "locale" parameter in the german code stays with "de". That is how it is supposed to work.
Unfortunately this custom XML configuration is not being applied to the shortcode in Elementor. I do not know if the fact that the shortcode is shown in the ATE is the problem for that? Maybe you could ask the 2nd Tier, if it is possible to apply the XML configuration without removing the shortcode from the ATE?
I have feedback from our 2nd Tier Support and could you try the workaround mentioned?
I found that the problem specifically relates to the shortcode attribute which has JSON as a value, i.e. the fc_args attribute.
If you switch around the quotes, so that the fc_args attribute value is wrapped in double quotes (rather than single) and the JSON instead uses single quotes (rather than double) then the problem won't occur.
So when using this shortcode only the locale attribute is offered for translation: