We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36604
    • 268 Posts
    Hi,

    I'm going further with Revo and Babel, but I'm stuck on this:
    Goal:
    having a chunk in the tpl with parameterized links (different href and text depending on which language is active).
    I'm using context (CX) to make the i18n, I have 2 cultureKey: fr + en.
    fr is for default web CX and seams not to be correctly handled by BabelTranslation, so I test it to discriminate these particular case, else I call BabelTranslation to find the corresponding page ID for the active language.

    Here's how for the targeted page ID 14 (14 is the french one).
    [[!BabelTranslation? &contextKey=`[[++cultureKey]]` &resourceId=`14`]]


    If I put this code somewhere it outputs correctly '15' wich is the expected Id (the one for the corresponding EN page), but using it into the full needed code below in the chunk, meaning the BabelTranslation call surronded by double brackets~ to create a link, it does not output anything here. so href is empty.

            [[!If?
       &subject=`[[++cultureKey]]`
       &operator=`EQ`
       &operand=`fr`
       &then=`<a class="adress-link" href="[[~14]]" title="[[%i18n.intlink_title? &language=`[[++cultureKey]]` &namespace=`i18ncustom`]]">Accès & Plans</a></li>`
       
       &else=`<a class="adress-link" href="[[~[[!BabelTranslation? &contextKey=`[[++cultureKey]]` &resourceId=`14`]]]]" title="[[%i18n.intlink_title? &language=`[[++cultureKey]]` &namespace=`i18ncustom`]]">[[!BabelTranslation? &contextKey=`[[++cultureKey]]` &resourceId=`14`]] - Find us</a></li>` 
    ]] 


    any clues ?

    thank you