Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I use i18n for all my translations
normally it's working correctly but I can't translate Stay informed on our latest news! in the block.
I configured that block to be translated but it does not help.
Comment | File | Size | Author |
---|---|---|---|
#9 | Translate-stay-informed-2031679-9.patch | 748 bytes | cyper983 |
Comments
Comment #1
Stevel CreditAttribution: Stevel commentedAre you using the Echo module to display the blocks around the content? If so, Echo doesn't have a language setting yet. I've added a patch at #1377632: Add language parameter. (the patch is for 8.x, but should work for the 7.x-version as well).
Try applying that patch, and then in the htmlmail module (htmlmail.mail.inc, line 78) add $message['language'] as the fourth parameter to the echo_themed_page() call.
After these steps, the e-mail should be fully translated to the subscriber language.
Comment #2
sahuni CreditAttribution: sahuni commentedNo I don't use Echo module. Why should I?
My default language is French and I use to get success with translation of my content with admin translation interface.
It's a little odd because there is that message we can change in user interface of the block but that don't appear in general admin translation interface. And inside module, there is also constant t('').
What to do to get in French (default) and German that text?
Comment #3
Stevel CreditAttribution: Stevel commentedSorry, I misunderstood (I was assuming you want the block translated in the e-mail newsletter).
Does the following patch work?
Comment #4
sahuni CreditAttribution: sahuni commentedThanks, you did it!
I had to write in the field of the block the English sentence "Stay informed on our latest news!".
I had to translate that sentence in the general admin translation interface.
And I appears in my block, in French and in German.
You're my champion.
Comment #5
cyper983 CreditAttribution: cyper983 commentedHi guys!
The previous patches doesn't worked to me and i saw that the translate funcition "t()" was not called inside the "simplenews-block.tpl.php" file under the "theme" folder.
Hope this helps!
Comment #6
Stevel CreditAttribution: Stevel commentedThere are some illegal characters at the start of the line.
Could you add the changes from the first patchfile to the new patch as well?
Comment #7
cyper983 CreditAttribution: cyper983 commentedAs you requested, I combined the two patches.
Bye!
Comment #8
cyper983 CreditAttribution: cyper983 commentedComment #9
cyper983 CreditAttribution: cyper983 commentedSorry guys!
Please use the "Translate-stay-informed-2031679-9.patch" patch.
Comment #10
Stevel CreditAttribution: Stevel commentedNeeds Review so Testbot can do it's work.
Comment #11
gianfrasoft CreditAttribution: gianfrasoft commentedTestbot is OK. I think you should fix the issue...
Comment #12
cyper983 CreditAttribution: cyper983 commentedWIll you insert my patch into new module version ?
Regards,
su8z3r0
Comment #13
csc4 CreditAttribution: csc4 commentedIs this patch committed?
Comment #14
Stevel CreditAttribution: Stevel commentedLooks good.
Comment #15
pixelsweatshop CreditAttribution: pixelsweatshop commentedPatch still works as of 19 May 2017. Maybe it can be committed? It's been RTBC for a couple years now.