This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » How to change the default locale for...

How to change the default locale for a certain siteaccess?

How to change the default locale for a certain siteaccess?

Friday 27 December 2013 12:08:00 pm - 1 reply

Hello, I am trying to test the multilingual feature using symfony2 translation files, please notice that I had no problems translating content objects, the problem here is using the file. So far the only way I found to set the default locale for a certain siteaccess was calling:


I could try to do this using the PreContentView event, but I would like to know if there is any easier way to do this. Suppose I have 2 siteaccess, english and french, and I have set default_locale as en, but I want to change it to fr when I access the french website, so I can translate the strings in my templates using the translations, how can we do this?

Tuesday 31 December 2013 12:56:51 pm

I have found a solution, it is basically the same idea I was thinking, but instead of using a PreContentView listener I am using an onKernelRequest listener.

Check my blog post:

Modified on Tuesday 31 December 2013 1:43:17 pm by Thiago Campos Viana


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

36 542 Users on board!

Forums menu

Proudly Developed with from