Hi,

I would like to use the option "Only contents in the user's preferred language" in section "Multilingual setting – new contents to include:" ( in admin/config/people/notify).

I wonder is it possible to send custom translated notifications to every user according to his/her language choice?

So first I would need to make a few translations of default message content:
New content notification for %user from %site_name
Greetings %user, this is a notification about new content from %site_name.
The full text is included in this e-mail, but to see the original node, you can click on the links below.
------------------------------------------------------------------------------
Recent nodes - 1 new post
------------------------------------------------------------------------------
1. %node_title [ %node_url ]

And secondly to send the translated messages.

I looked up the existing issues, but I did not find any working solution. Is this possible? Or could I send message only in one language - can I use only one template?

Best regards,

Peter

Comments

gisle’s picture

To translate default message content, visit https://localize.drupal.org/ and pick the language you want Notify translated into, and in the field "And/or pick a project:", type in "Notify". Then click "Go there".

You're now ready to translate all strings in Notify into that language. Translate at least the strings you want to change that appear in the message template.

Please note that your translations will only count as "suggestions", and not be available for update downloads until they are approved. To speed up the approval process, you may 1) Join the translation team for that language; and 2) Ask one of the language admins to approve your translations.

Press the "Board" tab to join, and to see a list of admins you can talk to to speed up the approval process.

If you haven't done so already, install and enable the Localization Update module.

When the strings have been approved, wait for about 24 hours for them to become available for download. Then, navigate to Administration » Configuration » Regional and language » Translate interface and visit the Update tab to get the strings updated with the translation you just made.

After translations have been made and your site updated with the translations, each user will have the boilerplate message template text in his or her own language.

peter.moravek’s picture

Thank you for the answer. It is great that the module works this way.

I got in touch with one of the language admins and I will work on the translation.

In the meanwhile is it possible to make local translation in my own system? It should also work, right?

peter.moravek’s picture

I am not sure, whether my next question belongs here but I did not find any other relevant issue:

How to change format of "Recent nodes" in "New content notification" message. E.g. I do not want to display full text of nodes, but I still want to show titles, authors and URLs.

What would be the best approach?

gisle’s picture

peter.moravek wrote:

is it possible to make local translation in my own system?

Yes, navigate to Administration » Configuration » Regional and language » Translate interface and click on the Translate tab. You can now search for specific strings you want to translate. Click the "edit" link to type in your local translation.

peter.moravek wrote:

How to change format of "Recent nodes" in "New content notification" message. E.g. I do not want to display full text of nodes, but I still want to show titles, authors and URLs.

This format is controlled by each user. When you click on "My account", you'll see a tab named "Notification settings". Under "Detailed settings, the user can decide how much to include. Authors are always shown. To show URLs you need to select "Fields". The setting you want for titles, authors and URLs would be: "Titles + Fields". Unfortunately, the current UI uses a radio button instead of checkboxes, and this setting is not among the available options.

If you want the "Titles + Fields" option, you may enter it a separate feature request in the issue queue, but it will probably not be implemented soon unless somebody provides a patch or sponsors the development.

peter.moravek’s picture

Ok, I understand. Thanks for the info. I will leave it be for now.

gisle’s picture

Status: Active » Fixed

Changing status.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

matt.rad’s picture

In case this helps anyone else, I have also had some success modifying message content using the String Overrides module.