Hi,

I've found that the content of the mail templates in mail_edit is translatable in localization. But i think mail_edit (or subscriptions ???) is looking for the default site language to send the email. If it would look for the user defined language instead, it would allow sending emails in different languages ??? Am I right ???

So simple for me to say ... but it's probably not so easy to do ??? Let me know please, as this feature would really enhance my website subscriptions process.

Thanks

Comments

salvis’s picture

As you suspect, it's not quite as easy as that.

As long as you don't save the templates, the default templates are used, and these are translatable. However, as soon as you save them, only the saved templates are used, and these don't go through localization. This is how user-defined text works everywhere in Drupal.

Drupal 6 is supposed to improve that, but I haven't looked into that aspect of D6 yet.

gustav’s picture

Sending mail in the user's language might nevertheless be a good idea because then pictrogram would just have to edit the templates directly in the subscriptions_mail.templates.inc rather than via mail_edit.

pictogram’s picture

Thanks for the replies,

I'm not sure to fully understand your replies guys !! Maybe I should explain again my case

I'm working on an multilingual intranet (7 languages). The content will be mostly in french but will have contributed items in other languages, as well. In order to let the users know about new items on the intranet, i use the subscriptions module. I noticed that I could translate the english strings of the templates in other languages. And I did. So I tested these new templates and noticed that subscriptions seems to pick the site wide default language (in french in my case) instead of the user defined language (which varies for each user). Again, maybe I'm to simplistic but is there any way in the code to let subscriptions look for the user lang instead of the default lang?

Thanks

salvis’s picture

What is it about #1 that you don't understand? I don't think I can say it any clearer than that.

The problem is that in Drupal 5 there is no good way to solve this. D6 promises to have it solved already.

@gustav: Yes, you have a point, but this is a pain to do (translations ought to be cached), and it won't survive saving the templates. So, this is not high up on my priority list, but if someone wants to supply a patch, then I'm in favor of doing it.

salvis’s picture

Status: Active » Postponed (maintainer needs more info)

I've looked into this, and I see no API in Drupal 5 to retrieve translations to multiple languages.

Any ideas?

salvis’s picture

Status: Postponed (maintainer needs more info) » Fixed

This has been a pain to implement, but I think it should work now.

However, as mentioned in README.txt, user-(locale-)specific translation only works for the default templates. If you want to customize them and retain the translation feature, you must change subscriptions_mail.templates.inc and not save any changes in Mail Editor. I've you've already done that and you want to go back, you need to manually delete the rows from the {mail_edit} and {subscriptions_mail_edit} tables.

salvis’s picture

Version: 5.x-2.0-beta9 » 5.x-2.0-beta12
Anonymous’s picture

Status: Fixed » Closed (fixed)

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