eZ Community » Forums » eZ Publish 5 Platform » Content Translations by siteaccess
expandshrink

Content Translations by siteaccess

Content Translations by siteaccess

Friday 05 April 2013 6:28:11 pm - 10 replies

Hello.

I'm developing a multilingual site with ez5, but I don't understand why content is always showing in the default content language (database) and not in the language for the specific siteaccess.

I'm using the 'languages' parameter in ezpublish.yml:

languages: [esl-ES, eng-GB ] for siteacces 'spanish'
languages: [eng-GB, esl-ES ] for siteacces 'english'

I found that specifying the language when calling 'ez_render_field' works:

{{ ez_render_field( content, "description", { lang : "eng-GB" } ) }}

but I would like it to choose the right language for each siteaccess.

Thanks

Friday 05 April 2013 6:39:26 pm

Hi Javier

Which version of eZ Publish are you using ?

Friday 05 April 2013 6:44:19 pm

Hello Jérôme.

I'm using the last versión from the git repository (well, I think I've downloaded 3 days ago).

Sunday 07 April 2013 7:51:11 pm

I'm presently seeing the same issue, when extending eZ\Bundle\EzPublishCoreBundle\Controller and rendering a specific content id, despite the correct siteaccess being set and the correct locale being set in the symfony Request.

 $this->getRepository()->getContentService()->loadContent( $contentId )

Renders english text, despite having the correct siteaccess and locale set.

 <h2>{{ ez_render_field( left, "title" ) }}</h2>

Renders french text

 <h2>{{ ez_render_field( left, "title", { lang : "fre-FR" }  ) }}</h2>

Sunday 07 April 2013 7:58:56 pm

Hmm that's interesting... Gonna check this tomorrow. Thanks.

Monday 08 April 2013 12:49:50 am

Quote from Jérôme Vieilledent :

Hmm that's interesting... Gonna check this tomorrow. Thanks.

Why does it map to the longer locale fre_FR instead of fr_FR? It means you need a mapping between the two.

Monday 08 April 2013 10:11:27 am

Quote from Andrew Johnstone :
Quote from Jérôme Vieilledent :

Hmm that's interesting... Gonna check this tomorrow. Thanks.

Why does it map to the longer locale fre_FR instead of fr_FR? It means you need a mapping between the two.

There mapping done between eZ and Symfony locale format here:

https://github.com/ezsystems/ezpu...064f06bc1b96222279804e7a95967b#L5L-1

Monday 08 April 2013 4:36:33 pm

Confirmed.

Issue reported here : https://jira.ez.no/browse/EZP-20665

Tuesday 09 April 2013 11:18:56 am

Issue fixed !

Thanks guys happy.gif Emoticon

Tuesday 09 April 2013 12:12:06 pm

Thanks to you guys!

Tuesday 09 April 2013 12:21:55 pm

I found a (maybe) related bug. I reported it in: http://share.ez.no/forums/ez-publish-5-platform/siteaccess-in-generated-urls

expandshrink

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

36 542 Users on board!

Forums menu

Proudly Developed with from