[Resolved] Translating the dates in Timeline Block For Gutenberg
This thread is resolved. Here is a description of the problem and solution.
Problem: You are using the Timeline Block For Gutenberg to present timelines on your site. When translating the page, everything including dates can be translated, but the dates still appear in French on the English page. This issue arises because the date is not from the core blocks and is not supported for string translation. Solution: We recommend using a custom XML configuration code to register the date for translation. After translating, the date should display correctly in the frontend. Here is an example code:
If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at 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.
Background of the issue:
I'm using the Timeline Block For Gutenberg to present timelines on our site hidden link. When I translate the page, I can translate everything, including the dates, but on the front-end, the dates still appear in French on the English page. I contacted the plugin authors, and they said: 'We are using core blocks for the heading and description in WordPress, which is why the page content is being translated. However, the date is not from the core blocks, so it is not supported for string translation.' The admin_texts_date_format have already been included in the string translations and are translated, so this doesn't seem to be the issue.
Symptoms:
Dates in the Timeline Block For Gutenberg appear in French on the English page despite being translated.
Questions:
Is there a way around this to translate these dates?
Thank you for contacting WPML support, I’m happy to help you with this issue.
I use the free version of the plugin Timeline Block https://wordpress.org/plugins/timeline-block/
and I can register the date for translation with a custom XML configuration code, after translating it the translation date displays correctly in the frontend. Here is an example code:
The plugin Timeline Block is not available in our list of compatible plugins (https://wpml.org/plugin/), I also suggest you contact the plugin author and ask them to join our Go Global program where our Compatibility developers will help them to make their product compatible with WPML. https://wpml.org/documentation/support/go-global-program/
So this works, but it does not only affect the date field. It seems some of the other content in the timeline - as well as lists in the page (but not in the timeline) - which were already translated using the WPML editor were also sent to string translation and I had to translate them again. Is there a way for this to only apply to the dates?
Please let me know the page where you add the Timeline block and translate it.
Then I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. Your next reply is set to private to share the info.
If the sentences are translated in the Advanced Translation Editor (ATE), the translation will be saved to the translation memory and you won't need to re-translate them.
I just edit the page in the French language > Make a small change to the page title > Save and update the translation in the ATE. Now you can see the translation content displayed in the frontend as well. Please check the attached screenshot.
Ok, but in the image your posted, the first item in the list ("Projet de règlement...") is still in French and it was already translated in the ATE (see screen capture) when you made the change in the title of the French page. Why didn't work for that one?
I just make a small change to the text "Projet de règlement 2217-III-P11" > Save > And re-update the translation, the translation text is displayed correctly in the frontend. Please check the attached screenshot.