Translate Email Subject

What is the best way to translate the subject line of an email?

image

All the other translations are working, and I have one for the subject line …
image

I believe this is an important clue, but I have tried a couple implementations without success.

Behind the scenes
Translations run before all User Scripts and are automatically applied when adding content to the document using the html() command.
https://learn.objectiflune.com/howto/creating-multilingual-connect-templates/

Hello bradbowak,

This should happen on the fly but I guess you stumbled into a bug. To workaround this do the following:

  1. Click the New Script icon on the toolbar of the Scripts panel and choose Subject from the Email Scripts section. The Edit Script dialog appears.
  2. In the Edit Script dialog click the Expand button to reveal the source code of the script.
  3. Insert the following after line 2:
    content = translate(content);
  4. Click OK to save the script.

Make sure that the translation string in the Translations panel matches the string in the Subject field (which seems to be the case in your screendump).

I’ll filed a bug report for this [internal reference: SHARED-83634].

Hope this helps,

Erik

Great. That helped. Got it working.

Another thing I realized as well…
The translations pane (POT file) and the translation files (PO files) need to be in sync.

My assumption was that the Translation Tab was just a template used to generated the PO file, and then gettext just used the PO file… but I was wrong. If the original template text is changed, both the Translations Tab text and the PO file need to be altered.

Thanks for your quick response, this greatly speeds up development/progress on our side.