eZ Community » Forums » Developer » fetching with language code

fetching with language code

fetching with language code

Wednesday 18 April 2012 11:10:56 am - 2 replies


i have an node with 15 languages. I am trying to fetch the english version.

{def $test_node = fetch('content', 'node', hash('node_id', $module_result.node_id, 'language_code', 'eng-GB'))

But the url_alias is always in the current language so for example if i am in german site access the url_alias of $test_node is german. Am I doing something wrong?

How is it possible to get the english url_alias of a node? I only need the url_alias.. I'm sure its easy but I am blind at the moment ;D

Wednesday 18 April 2012 6:51:36 pm

Hi Robert,

i think this is what you're looking for happy.gif Emoticon


Wednesday 18 April 2012 8:39:29 pm

Thanks Edi! Also big thanks to Jérôme for the detailed post. I did my fetch with the switchlanguage option now. Thanks. Helped me a lot! happy.gif Emoticon

That it didn't work with my fetch above was maybe caused because i didn't set the fallback language in the regional settings.



You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from