Tuesday, December 23, 2008

Spreading strings over multiple lines in .po files

It's a bother working with i18n files that have strings wider than your editor screen. But it's possible to cut up these long strings, and put the parts one different lines in your .po file. The string is easier to read and edit this way:

msgstr ""
"${name} invited you to join this site.\n"
Click this link to join:\n"

This is handy in the case of e-mail templates. Of course, the \n's are here to render line breaks in the translated message, the have nothing to do with line breaks in the .po-file.

No comments: