I'm trying to implement a translation in Cakephp but isn't working and don't show me any erros.
I have this HTML
in a element
<a href="/sites/pages/servicos" target="_blank">
<span class="title">Serviços</span>
<div class="description"><?php __('o que fazemos') ?></div>
</a>
In App Controller inside beforeFilter()
:
Configure::write('Config.language', 'eng');
In my folder locale/eng/LC_MESSAGES/default.po
I have this:
msgid "o que fazemos"
msgstr "What we do"
But isn't working... Thanks
I think you're just forgot "echo"
<?php echo __('o que fazemos'); ?>
Have you correctly generated the i18n files with the ./cake i18n
command?
Use PoEdit to edit your translate files, instead of doing it by hand if you've done so.
http://poedit.net/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With