Problem switching languages using ezwebin extension

Author Message

Salvatore Guarino

Thursday 07 February 2008 2:43:21 am

I have a problem switching languages on my 4 languages site. I used the ezwebin extension, that has the following code to generate languages links:

<ul>
        {foreach $pagedesign.data_map.language_settings.content.rows.sequential as $row}
        {def $site_url = $row.columns[0]
             $language = $row.columns[2]}
        {if $row.columns[0]}
            {set $site_url = $site_url|append( "/" )}
            <li{if $row.columns[1]|downcase()|eq($access_type.name)} class="current_siteaccess"{/if}>
            {if is_set($DesignKeys:used.url_alias)}
                <a href="{concat( "http://", $site_url,
                         $DesignKeys:used.url_alias
                         )}">{$language}</a>
            {else}
                <a href="{concat( "http://", $site_url,
                         $uri_string
                         )}">{$language}</a>
            {/if}
            </li>
        {/if}
        {undef $site_url $language}
        {/foreach}
        </ul>

My primary language is the italian. The problem is this:

I access to the site at the address www.my-site.com/ita/prodotti (it works),
then I click on the "eng" link that point to this address: www.my-site.com/eng/prodotti (it works), but now if I click again on ita it doesn't point to www.my-site.com/ita/prodotti but to www.my-site.com/ita/products (in english) and this link doesn't works. The same problem is present switching between all other languages, the first time it works, but the second time the variable $uri_string is wrong, it doesn't contain the string in the destination language but in the string in the current language. I think that is a bug in the ezwebin...

Thx in advance for your help!

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