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.
This topic contains 6 replies, has 3 voices.
Last updated by olegA-5 7 months, 1 week ago.
Author | Posts |
---|---|
April 11, 2024 at 1:40 pm #15509559 | |
olegA-5 |
Translation of a custom field that includes "\n", i.e. a line break, ends up being converted to just "n". How do I fix this? (When translating the same text as part of the "body" of a page/post, there is no problem, the translation is saved correctly, along with the backslash). |
April 12, 2024 at 12:15 am #15511097 | |
Andreas W. Supporter Languages: English (English ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, Please use the HTML-dedicated <br> Tag instead. hidden link Best regards |
April 12, 2024 at 8:12 am #15511814 | |
olegA-5 |
Hello and thank you for the suggestion about the content of my original texts, However, I want my exact translations of the texts I really want to translate to be kept correct. Since this translation (like the original) includes (and should include) "\n", I would like to know how to get WPML to save it the way I did. |
April 12, 2024 at 10:09 am #15512438 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
Could your please try to see if the issue still happen using a different translation engine? |
April 12, 2024 at 10:24 am #15512475 | |
olegA-5 |
Laura, What exactly do you mean by "a different translation engine"? |
April 12, 2024 at 10:40 am #15512565 | |
Laura Supporter
Languages: English (English ) Italian (Italiano ) Timezone: Europe/Rome (GMT+01:00) |
You can select which engine to use for Automatic Translation. The default one is DeepL, but you can change it in WPML > Settings. If changing the engine solves the problem, then the issue is caused by DeepL itself, and in that case there is little we can do. |
April 12, 2024 at 10:46 am #15512575 | |
olegA-5 |
I don't use Automatic Translation. As you can see in the screenshot I attached, both the original and the translation I made contain "\n". The problem is that this is not saved when "publishing" the translation (since this part belongs to one of the plugins, it is not published in the frontend, but is only used by the plugin for captioning images). Exactly the same text, if it is part of the "page body" is saved by WPML correctly, with "\n". Accordingly, I suspect that some rule should be added (to wpml-config.xml?) so that the plugin text translation is saved correctly. |
The topic ‘[Closed] Translation of a custom field that includes "\n" (line break) converts to "n"’ is closed to new replies.