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 » Developer » Redirec URL to page under...

Redirec URL to page under contruction on language selected

Redirec URL to page under contruction on language selected

Thursday 04 September 2014 11:02:08 pm - 3 replies

So my problem is that basically I've got 3 languages in my template, now I've got only one of them completely translated, so now I just want to redirect the user to a "page under construction" when the user select untranalated language.

Friday 05 September 2014 1:55:30 am

I've created a new folder and linked to there, but I want some elegant way to achieve this.

Modified on Friday 05 September 2014 1:55:50 am by Pavel Miron

Friday 05 September 2014 11:19:02 pm

Hello Pavel,

One question, are you talking about content object language translations or are you talking about template string translations? They are different at a technical level and as such the solution would be different depending on your answer.

Redirection from a template

In general it's a very very very bad idea to even try to do redirection from within a template, period. In fact the eZ Systems crew have made this an even more discouraged practice in the new kernel.

This is because it causes technical problems as it is a bad way to design or code a your site.


Template string translations

To my knowledge there is no automatic good way to know if a template string translation is complete at the template layer. This is addressed on a per string basis in template string translations. Worse this also would be a very bad idea / approach to take to solving the problem your faced with.


Siteaccess specific template overrides

If your content object translations are incomplete then you can always handle this with siteaccess specific template overrides to display some kind of custom message explaining this to the user. 


Use the main language if there is no prioritized translation

I think I would strongly recommend using the '"Use the main language if there is no prioritized translation" feature within the eZ Publish Admin to expose say completed eng-US translated content objects where fre-FR language or ger-DE language translations are expected but are incomplete.

In this way at least some content is available to the user who can use features within the web browser (like in google chrome) to translate the web page text into their native languages etc. Plus all the hard work is already done for you right out of the box. You just have to enable this feature (per content object).

Using the "Use the main language if there is no prioritized translation" you no longer have to worry about the problems surrounding redirecting user page views and so many more problems surrounding this bad idea.

To enable this feature, simply use the admin siteaccess and navigate to a content object, click the translations tab, check the box labeled "Use the main language if there is no prioritized translation" and click update. Then view the content object from your user siteaccess (that uses a different content object translation / language by default). voilà problem solved!


I hope this helps!


Saturday 06 September 2014 8:14:43 am

Uhh yeah ..

@Heath: You try too hard man. Take it eZ ...

I'm fairly certain he was talking about template translations.

While you should not do it, here is a sharp knife. redirect to your hearts content:

Still, I think he should use custom templates that explain the problem to the user in each language siteaccess and not use redirection from within templates.


THEME: Modest Mouse - This Is a Long Drive for Someone With Nothing to Think About ...


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

36 542 Users on board!

Forums menu

Proudly Developed with from