跳转至内容 跳转至侧边栏

標籤: 

本主题包含 0 則回覆 ,有 0 声音 。

最后由 Sietse 3 months, 1 weeks前 更新。

协助者:: Christopher Amirian.

作者 帖子
8 5 月, 2025 于 12:53 下午 #17011789

Sietse

Background of the issue:
I am trying to translate a shortcode embedded inside a text using WPML. The text 'Gemiddelde beoordeling van een 9,6!' translates to 'For 10 years, we’ve received 200+ positive reviews on Funda, with an average score of 9,6!' The 9,6 is a shortcode named [funda-rating]. I registered it as a shortcode using WPML configuration to translate it using string translations. The issue can be seen on this page: 隐藏链接. Here is my original code: Gemiddelde beoordeling van een [funda-rating]! Het gemiddelde is gebaseerd op 80 beoordelingen in de laatste 24 maanden. Bekijk alle beoordelingen op Funda.nl.

Symptoms:
The shortcode translation breaks my code. The 9,6! gets isolated inside a different tag, breaking the layout. Instead of the expected layout, I got: Average score of 9,6!The average is based on 80 reviews in the last 24 months.View all reviews on Funda.nl.

Questions:
How can I prevent the shortcode translation from breaking my code layout?