eZ Community » Forums » Setup & design » Fetch Content Translation
expandshrink

Fetch Content Translation

Fetch Content Translation

Monday 06 May 2013 4:01:36 pm - 7 replies

Hello Everyone, 

Is there a way in smarty template to fetch a specific translation content (in my case fre-FR) on a siteaccess where Locale and ContentObjectLocale are not fre-FR ?

I'm working with the latest eZPublish 4.x version.

I tried

fetch( 'content', 'node', hash('node_id', $object.main_node_id, 'language', 'fre_FR')  )

and 

fetch( 'content', 'object', hash('remote_id', $object.remote_id, 'language', 'fre_FR')  )

But when I display data_text or content property attributes, it always display the current siteaccess locale value.

Thanks for your answers.

Modified on Tuesday 07 May 2013 12:09:38 pm by Thierry Poinot

Wednesday 08 May 2013 10:35:27 am

It looks like "language" is the name of the param for fetch content/list, for content/node it is language_code...

Tuesday 14 May 2013 8:54:09 am

Even when I specified language_code or default_language or language, to fre_FR, it displays the English version on english siteaccess.

Is there any way to force a language traduction fetch on a content of a translatable class ?

Tuesday 14 May 2013 9:03:08 am

Quote from Thierry Poinot :

Even when I specified language_code or default_language or language, to fre_FR, it displays the English version on english siteaccess.

Is there any way to force a language traduction fetch on a content of a translatable class ?

Hi Thierry, and welcome aboard the eZ Community.

You may want to try with 'fre-FR' as value.

Let us know,
Cheers, 

Tuesday 14 May 2013 10:35:47 am

Wow...

Should I change my job for a little underscore? Thanks...

Tuesday 14 May 2013 11:17:09 am

Quote from Thierry Poinot :

Wow...

Should I change my job for a little underscore? Thanks...

Did it work?

Cheers,

Tuesday 14 May 2013 3:11:48 pm

Yes it works ! thank you very much!

it's unbelievable that I can't see that error.

Tuesday 14 May 2013 3:18:54 pm

Quote from Thierry Poinot :

Yes it works ! thank you very much!

it's unbelievable that I can't see that error.

This happens to the best of us, no worries happy.gif Emoticon

And that's the whole power of an open-source community!

Cheers,

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from