By default on block of simplenews there is write:
"Stay informed on our latest news!" and if I put the correct translation strings, the new words don't works.

In the simplenews-block.tpl.php i think that it should be so:
Now (don't work)

<?php if ($message): ?>
    <p><?php print $message; ?></p>
  <?php endif; ?>

after (work)

<?php if ($message): ?>
    <p><?php print t($message); ?></p>
  <?php endif; ?>

that's right?

bye

Comments

sutharsan’s picture

Status: Active » Closed (works as designed)

The default string 'Stay informed on our latest news!' is translated by a t() function. Any block specific text you enter is not translated. The correct way of translating the default text is via Site building > Translate interface.

namberone’s picture

Before of the change of code, I've tried as you say(translate of "Stay informed on our latest news!" in other language....

but...don't work.

federico.giunchi’s picture

Same issue, without the "t" in front to the variable the content is not translated.

MantasK’s picture

I think problem is with i18nblock translation module, because it translates only title and body:

tt("blocks:block:$delta:title", $block['title'], NULL, TRUE);
tt("blocks:block:$delta:content", $block['body'], NULL, TRUE);

maybe instead of message in settings form could be used body name?

We can use t() in template file, but only if defaul language is Enghlish.

juan m’s picture

Hi!

I have other language as default and nothing of the wrote before was effective to resolve the problem...
¿Some additional idea?

Thanks in advance!

mokko’s picture

similar issue: http://drupal.org/node/606282, currently active

neek’s picture

i changed this tpl a bit and its works with string translations..

if ($message):

print t('Stay informed on our latest news!');

endif;

tomsm’s picture

Thanks, adding a t function translates the message.