I have custom template – to translate autogenerated views. There is for example a line:
echo "<?php echo \$this->Html->link(__('Lista " . $pluralHumanName . "'), array('action' => 'index')); ?>";
My models have english names (as cake’s convention wants) but I want to use translated model names in auto created views. For example in Title Model I was trying to declare:
$pluralHumanName = 'Stanowiska';
but generated view files always have english name… and I have to translate each file manually. Is there a way to translate/change $singularHumanName and $pluralHumanName ?
why are you double-translating then?
the __() already translates. So you try to translate your translated string a second time (without having the translated strings in your po then of course).
You should stick with the english words in your __() and then put your “Lista” and other translated strings in your po file.
Or just:
without the
__()around. The__()for $pluralHumanName, though, translates right away in your template and will become the your desired name (hardcoded). But as I mentioned above, you usually don’t go that way!