当我用母语更改语言时,URL的和处有?controllerUri = index,这仅发生在主页中 还有一个类别左菜单的问题,我在URL末尾有?controllerUri = category,所有其他URL都可以正常工作。
只需尝试过来自prestashop论坛(cronjob)的解决方案
这是块语言tpl的代码
{if count($languages) > 1}
<div id="languages_block_top">
<div id="countries">
{* @todo fix display current languages, removing the first foreach loop *}
<span class="lang-label">{l s='Lingua' mod='csblocklanguages'}: </span>
<div class="languages-list">
{foreach from=$languages key=k item=language name="languages"}
{if $language.iso_code == $lang_iso}
<span class="current-lang">{$language.name} <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /></span>
{/if}
{/foreach}
<ul id="first-languages" class="countries_ul">
{foreach from=$languages key=k item=language name="languages"}
{if $language.iso_code != $lang_iso}
{assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<li><a href="{$lang_rewrite_urls.$indice_lang|escape:htmlall}" title="{$language.name}">{$language.name} <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /></a></li>
{else}
<li><a href="{$link->getLanguageLink($language.id_lang)|escape:htmlall}" title="{$language.name}">{$language.name} <img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" /></a></li>
{/if}
{/if}
{/foreach}
</ul>
</div>
</div>
</div>
{/if}