

Return htmlspecialchars(_($msg_id), ENT_COMPAT | ENT_HTML401, 'UTF-8') Įdit: The answer to the updated question is "no, not with Poedit". * Fetches translation as HTML (single line) Return nl2br(htmlspecialchars(_($msg_id), ENT_COMPAT | ENT_HTML401, 'UTF-8'), false) * Fetches translation as HTML (block with line feeds) This is pretty lengthy so I suggest writing wrappers: /** Note the bubble icon on the left side of a string indicates there is a Comment, generally containing the. A POT file is essentially an empty PO file without the translations, with just the original strings. Launch Poedit and Create new translation. They will have all the translation strings left empty.
Poedit add new string download#
Poedit add new string code#
IMHO, accepting HTML code from translators is kind of risky. The string will be printed with echo, so the string should be valid HTML. (No idea about what other graphical tools do.)

Unluckily, the popular Poedit program does not make it easy: you can type actual new lines with the Enter key but they are silently discarded on save! You can insert new lines even with Poedit but you need to type a \n escape sequence manually: The PO catalogue format itself does not restrict translations to be one-liners but you need to use proper markup: #: example.php:2
