0

I'm working on a bilingual web application (Englisch (primary) and German (secondary)).

The translation/internationalization is done this way:

In my view I have:

<?php
if($user['User']['isLocked'] == '1'){
    echo __('yes');
}else{
    echo __('no');
}?>

I'm using pot files. In the German folder inside the pot file I have translated "yes" with "ja" and "no" with "nein" (according to http://book.cakephp.org/2.0/en/console-and-shells/i18n-shell.html). This is working perfectly.

On the other hand the translation of buttons doesn't work at all.

In my view:

<?php
echo $this->Html->Link(
    __('Edit'), array('action' => 'edit', $user['User']['id']), array('class' => 'button')
);
?>

I want "Edit" to become "Bearbeiten". Therefore the pot file was updated. But somehow the view still displays the English text instead of the German text. So this process doesn't work for buttons. What can I do?

mosquito87
  • 4,270
  • 11
  • 46
  • 77
  • 3
    First, try clearing the cache (`app/tmp/cache/persistent`). – ndm Aug 08 '14 at 13:11
  • That did it :). Thank you. If you add it as an answer I can mark it as solution. – mosquito87 Aug 08 '14 at 13:19
  • You're welcome. I don't think it needs an answer, I think we can close this as a duplicate. – ndm Aug 08 '14 at 16:02
  • possible duplicate of [CakePHP cache i18n translate](http://stackoverflow.com/questions/13518603/cakephp-cache-i18n-translate) – ndm Aug 08 '14 at 16:02

0 Answers0