Zend_Translate Navigation items from application.ini

258 views Asked by At

At the moment I try to translate my web application with zend_translate.

I made it already that far to translate the view in the application.

At the moment I struggle with the follow thing. I want to translate my navigation items who I setup by application.ini . I have no clue how to make this thing working.

I hope someone can show me an clear example with some description.

With kind regards,

Nick

1

There are 1 answers

0
Nepomuk Pajonk On

don't you run through the navigation items in the view? like this

<?php

// in controller something like:
// pseudocode: $this->view->nav_items = My_Model_Nav::getItems();

// somewhere in the view:
?>
<ul>
<?php foreach ($this->nav_items as $item) : ?>

<li><a href="..."><?php echo $item['name']; ?></a></li>

<?php endforeach; ?>

</ul>

i think in this case, you only have to change one line into:

<li><a href="..."><?php echo $this->_($item['name']); ?></a></li>

if not, post your view snippet