Hey there,
I am using Babel for my website and my aim is to have a navigation, that works in every context. This is surely possible with wayfinder, but I can't use wayfinder for several reasons.
Currently, I am wrapping my head round this:
If I use just this:
It'll always lead me to the same resource and disregard the set language.
However, there is a snippet in Babel called BabelTranslation which returns the id of a document in the language I choose. So if 6 is a document in english and I want the resource id of the matching german document I just do this:
[[BabelTranslation? &resourceId=`6` &contextKey=`de`]]
Alright, just one step away from the solution:
Now I don't want to set the contextKey (language) manually like in the example above. Instead, I want to read it from the setting cultureKey. My final result is a set of nested chunks, which does not work however.
<a href="[[~[[BabelTranslation? &resourceId=`6` &contextKey=`[[++cultureKey]]`]]]]">foo</a>
Is this a syntax error or more an error of my understanding? Should I write my own Snippet for that instead?
Cheers
Chris