Strings containing new lines like emails content are not translated
-
Hi there!
(note : backslashes are removed on the forum, so “n” is “backslash-n”)
I have a problem concerning the translation using the po/mo files. Everything works fine except for the emails content because of the new lines. Not the \n new line, but real new lines in code, as for example the file bp-groups-notifications.php:21 :
`
$message = sprintf( __(
‘Group details for the group “%s” were updated:To view the group: %s
‘, ‘buddypress’ ), $group->name, $group_link );
`Using Poedit myself or using the official translations (french in my case) generates the same po entry :
`
#: bp-groups/bp-groups-notifications.php:23
#, php-format
msgid “”
“Group details for the group “%s” were updated:n”
“n”
“To view the group: %sn”
“n”
”
n”
msgstr “”
“Les options de la famille “%s” ont été mises à jour:n”
“n”
“Accéder à la famille: %sn”
“n”
”
n”
`In run time, the match is not made and therefore the content is not translated. The only way will be to add_filters to modify the email content, replacing the real new lines by n.
Any idea how to solve it ?
Thanks!
- The topic ‘Strings containing new lines like emails content are not translated’ is closed to new replies.