eZ Publish 4.0 Language change link

Author Message

Angelo Maiorano

Wednesday 18 June 2008 11:56:13 pm

Hello,

I setup a website in 4 languages, for different language "same" page have got different url.

I try to use syntax i see in std layout for langiage selection but link are not goog.

syntax is this one:

{if $locales|count|gt( 1 )}
{foreach $pagedesign.data_map.language_settings.content.rows.sequential as $row}
{def $site_url = $row.columns[0]
$language = $row.columns[2]}
{def $site_url=ezini( 'SiteSettings', 'SiteURL', 'site.ini' )}
{if $row.columns[0]}
{set $site_url = $site_url|append( "/" )}
{set $language = $language|append( "/" )}
{if is_set($DesignKeys:used.url_alias)}
<a href="{concat( "http://", $site_url, $language,
$DesignKeys:used.url_alias
)}">[ {$language} ]</a>
{else}
<a href="{concat( "http://", $site_url,
$DesignKeys:used.url_alias
)}">[ {$language} ]</a>
{/if}

{/if}
{undef $site_url $language}
{/foreach}
{/if}

I think the problem is to have the url in the right language.

Many thanks

Angelo

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.