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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Stevel’s picture

Are 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.

sahuni’s picture

No 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?

Stevel’s picture

Version: 7.x-1.0 » 7.x-2.x-dev
Category: support » bug
Status: Active » Needs review
FileSize
387 bytes

Sorry, I misunderstood (I was assuming you want the block translated in the e-mail newsletter).

Does the following patch work?

sahuni’s picture

Thanks, 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.

cyper983’s picture

Hi 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!

Stevel’s picture

Status: Needs review » Needs work
��diff --git a/new_file.php b/new_file.php

There 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?

cyper983’s picture

Issue summary: View changes
FileSize
11.55 KB

As you requested, I combined the two patches.

Bye!

cyper983’s picture

cyper983’s picture

FileSize
748 bytes

Sorry guys!

Please use the "Translate-stay-informed-2031679-9.patch" patch.

Stevel’s picture

Status: Needs work » Needs review

Needs Review so Testbot can do it's work.

gianfrasoft’s picture

Testbot is OK. I think you should fix the issue...

cyper983’s picture

WIll you insert my patch into new module version ?

Regards,
su8z3r0

csc4’s picture

Is this patch committed?

Stevel’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

pixelsweatshop’s picture

Patch still works as of 19 May 2017. Maybe it can be committed? It's been RTBC for a couple years now.