Skip Navigation

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/
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

Tagged: 

This topic contains 0 replies, has 0 voices.

Last updated by Kor 1 day, 8 hours ago.

Assisted by: Kor.

Author Posts
November 29, 2024 at 2:34 pm #16459988

zenC

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?

December 2, 2024 at 5:35 pm #16467812

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I'm able to replicate it here hidden link on our sandbox site. Here is the test page hidden link .

Please allow me to escalate this to our 2nd Tier Support for further assistance. I will come back to you as quickly as possible.

December 4, 2024 at 8:11 am #16474895

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

We are still checking on this and I will come back to you once I've feedback.

December 4, 2024 at 9:26 am #16475373

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

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?

Screenshot_39.jpg
Screenshot_40.jpg
December 7, 2024 at 3:04 pm #16488487

zenC

Hello Kor,

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?

December 9, 2024 at 6:27 am #16491067

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I've shared your feedback with our 2nd Tier Support and I will come back to you once I've feedback.

December 23, 2024 at 8:53 am #16539547

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

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:

[pretty_google_calendar 
no_link="true" 
use_tooltip="true" 
views="dayGridMonth" 
locale="de" 
fc_args="{
    'firstDay':'1',
    'headerToolbar': {
        'start': 'title',
        'center': '',
        'end': 'today'
    }
}" 
gcal="c_69dc0f19171c93afe6a0ce324f94864551ec990b10c8ca06140c8dce9f6e83db@group.calendar.google.com,c_951882ba28cfef7ad0dd5d6d82eb3a13b6db4cec8981e1d99cbd8164ea89e2f5@group.calendar.google.com,c_822e684a5da40f163ade8255c42a40c7d33fb423a67531cc56c8f306a72a77c0@group.calendar.google.com"
]