When I use cakephp i18n, I must wite the sentences as
<?php __('Una cadena'); ?>
<?php $this->Form->input('name', array(__('Un nombre', true))); ?>
Then, I must do the next lines for extract the tranlate words
$ cake i18n
e
Now, I am working with a template engine, dwoo, the main idea is avoid
using "<?php ?>" on views. For get this functionality on my views, I
have create a helper
class I18nHelper extends AppHelper {
function get_text($string, $flag = FALSE) {
return $string;
}
}
And the sentences will be on this way, using teh helper
{$i18n->get_text('Una Cadena')}
{$form->input('name', array($i18n->get_text('Un Nombre')))}
Also I have edit the file
/cake/libs/tasks/extract.php
fo adding the line
$this->__parse('get_text', array('singular'));
on the method
function _extractTokens() // línea 220
and then, after do
$ cake i18n
e
I couldnt get anythingf of my tranlated lines. I have notiec that the
extract.php file use the php funciotn "tokens_get_all", then I can
supouse that my dwoo tags "{}" are not readed by this funcions and my
i18n wont work.
My question is find a solution to this issue and get the best way for
work with i18n using "{}" instead of "<?php ?>"
Thanks
Carlos
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment