> Hi
>
> I had to make my own function __d and put in bootstrap file, like this:
>
> function __myd($domain, $msg, $return = false) {
> $str = __d($domain, $msg, true);
> $var = array('translation' => $str, 'md5'=> md5($str));
> $count = count(Configure::read('var')) + 1;
> Configure::write("speaklike.$count", $var);
> return __d($domain, $msg, $return);
>
> }
>
> In the views I use:
> __myd('public', 'Hello world');
>
> I tried to extract the pots files using 'cake i18n extract' in terminal, but
> didnt work... because I created my own function to translate. How can i
> extract the pots files?
Well you'll need to write your own extract task, extending the core
extract task and call
$this->_parse('__myd', array('domain', 'singular'));
in it.
AD
--
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