Gettext-extractor won't find translations

Notice: This thread is very old.
ondrej.cech
Member | 2
+
0
-

Hi, I'm using brilliant Gettext-extractor but it can't find translations provided using variable:

{var $title = _'Translate me!'}

Is there any other simple solution than defining the variable in presenter?

Last edited by ondrej.cech (2014-02-20 11:48)

voda
Member | 561
+
0
-

This code doesn't even work, or does it?

You can use one of these:

{var $title = $template->translate('Translate me!')} // depends on the translator you are using
// or
{capture $title}{_'Translate me!'}{/capture}
ondrej.cech
Member | 2
+
0
-

Sorry about the excess <script> tag, I thought it will enable code highlighting on this forum ;) It's not part of the original code I'm using.

{var $title = $template->translate('Translate me!')}

This one doesn't work as ‘Translate me!’ message won't be discovered by your extractor. The second solution works fine-thanks a lot!

Last edited by ondrej.cech (2014-02-20 11:53)