I'm working on a page with multi language support. I've managed to get it to work with realurl and the backend.
Now I'm not quite sure how to render the translated text from the backend.
For instance: I have a page in the default language (en) with the title "Contact". Now I have created a translation in german with the title "Kontakt".
With my configuration my url now says:
- en: domain.com/en/contact
- de: domain.com/de/kontakt
But my navigation rendered with a fluid template still shows the default language even on the german url. Is there a variable for {page.title.currentLanguage} or something like that?
Of course I could create a translation inside a locallang.xlf file but in order to use the f:translate viewhelper, but that would mean I have to translate the page's name twice, right?
I appreciate all the help!
My current partial for rendering the navigation:
<nav>
<div class="container">
<ul class="content btns">
<f:for each="{mainnavigation}" as="mainnavigationItem">
<li class="{f:if(condition: mainnavigationItem.active, then:'active')}">
<a href="{mainnavigationItem.link}" target="{mainnavigationItem.target}" title="{mainnavigationItem.title}">{mainnavigationItem.title}</a>
<f:if condition="{mainnavigationItem.children}">
<ul>
<f:for each="{mainnavigationItem.children}" as="child">
<li class="{f:if(condition: child.active, then:'active')}">
<a href="{child.link}" target="{child.target}" title="{child.title}">{child.title}</a>
</li>
</f:for>
</ul>
</f:if>
</li>
</f:for>
</ul>
</div>
</nav>