This thread is resolved. Here is a description of the problem and solution.
Problem:
You are trying to translate the wpforms email body.
Solution:
While we work on a permanent fix, we recommend you try this temporary workaround. Please add the following code to your functions.php file:
add_filter('wpml_st_string_translation_before_save', 'sanitize_translation_before_save', 10, 1); function sanitize_translation_before_save($translation_text) { $translation_text["value"] = str_replace("\n", "\r\n", $translation_text["value"]); return $translation_text; }
This code modifies the translation text to ensure proper formatting. You can verify its functionality in the provided Sandbox, where the entries are logged in the installed "WP Mail Log" plugin.
If this solution does not resolve your issue or 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 needed, please do not hesitate to open a new support ticket at WPML support forum for further assistance.
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 3 replies, has 2 voices.
Last updated by 5 months, 3 weeks ago.
Assisted by: Marcel.