Jump to content

How can I fix the translation link?


Recommended Posts

I have tried to change and update all the translation pack in back office but it is not success. Everytime I click the langauge link it will show page not found. Once I  click home icon it will point to homepage which the image slider, categories name is not update and sync with English main home page.

What should I do? Or I have to fis the link in my header.tpl file

post-547408-0-81965900-1378686070_thumb.png

post-547408-0-27862200-1378686084_thumb.png

post-547408-0-46973600-1378686242_thumb.png

 

My shop url www.grandcoralaustralia.com.au

Prestashop version 1.5.4.1

 

Link to comment
Share on other sites

HI Vekia

Do you mean the template or php?

This is the template that I implemented with custom theme.

 

<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages_block_top">
<ul id="first-languages">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso}
   {assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">
{else}
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
{/if}
 
{/if}
<!-- insert link here -->
 
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
<!-- end of insert  link here -->
{$language.iso_code}
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
 
{/foreach}
<div class="language-right"> </div>
</ul>
 
</div>
 
 
<script type="text/javascript">
$(document).ready(function () {
$("#countries").mouseover(function(){
$(this).addClass("countries_hover");
$(".countries_ul").addClass("countries_ul_hover");
});
$("#countries").mouseout(function(){
$(this).removeClass("countries_hover");
$(".countries_ul").removeClass("countries_ul_hover");
});
 
});
</script>
{/if}
 
<!-- original code
<div id="languages_block_top">
<ul id="first-languages">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso}
   {assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">
{else}
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
{/if}
 
{/if}
{$language.iso_code}
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
{/foreach}
</ul>
</div>
end of original code-->
 
<!-- /Block languages module -->
Link to comment
Share on other sites

use this:

{$lang_rewrite_urls.$indice_lang|replace:''|'grandcoralausralia'}

 

and for test purposes this:

{assign var=langurl value=$link->getLanguageLink($language.id_lang)}

<a href="{$langurl|replace:''|'grandcoralausralia'}" title="{$language.name}">

Link to comment
Share on other sites

@Vekia it did not come across. The result is blank page/server error so I replace it with the one that I post.

This is an error log from my host.

PHP Notice:  Trying to get property of non-object in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/cache/smarty/compile/8c/9f/87/8c9f872902406d627e8f482c88bb61be4afc7832.file.product-list.tpl.php on line 83PHP Notice:  Trying to get property of non-object in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/cache/smarty/compile/8c/9f/87/8c9f872902406d627e8f482c88bb61be4afc7832.file.product-list.tpl.php on line 83

What else should I do?

 

Another two issues that I am facing are

1. Home page in English display Thai language (see attached and you can see by click on it)

2. In back office, default module language has changed to Thai. I also tried to fix by reimport the language pack under the localisation>Translations. Nothing work and nothing is solved.

Employees setting is active in English.

post-547408-0-49752400-1378860549_thumb.png

The default module has changed to be Thai

post-547408-0-53283200-1378860637_thumb.png

 

 

Edited template

 

<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages_block_top">
<ul id="first-languages">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso}
   {assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<!-- <a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">-->
<a href="{$lang_rewrite_urls.$indice_lang|replace:''|'grandcoralausralia'} " title="{$language.name}">  <!--replace with this link-->
 
{else}
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
{/if}
 
{/if}
<!-- insert link here -->
 
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
<!-- end of insert  link here -->
{$language.iso_code}
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
 
{/foreach}
<div class="language-right"> </div>
</ul>
 
</div>
 
 
<script type="text/javascript">
$(document).ready(function () {
$("#countries").mouseover(function(){
$(this).addClass("countries_hover");
$(".countries_ul").addClass("countries_ul_hover");
});
$("#countries").mouseout(function(){
$(this).removeClass("countries_hover");
$(".countries_ul").removeClass("countries_ul_hover");
});
 
});
</script>
{/if}

 


@Vekia it did not come across. The result is blank page/server error so I replace it with the one that I post.

This is an error log from my host.

PHP Notice:  Trying to get property of non-object in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/cache/smarty/compile/8c/9f/87/8c9f872902406d627e8f482c88bb61be4afc7832.file.product-list.tpl.php on line 83PHP Notice:  Trying to get property of non-object in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/cache/smarty/compile/8c/9f/87/8c9f872902406d627e8f482c88bb61be4afc7832.file.product-list.tpl.php on line 83

What else should I do?

 

Another two issues that I am facing are

1. Home page in English display Thai language (see attached and you can see by click on it)

2. In back office, default module language has changed to Thai. I also tried to fix by reimport the language pack under the localisation>Translations. Nothing work and nothing is solved.

Employees setting is active in English.

post-547408-0-49752400-1378860549_thumb.png

The default module has changed to be Thai

post-547408-0-53283200-1378860637_thumb.png

 

 

Edited template

 

<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages_block_top">
<ul id="first-languages">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso}
   {assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<!-- <a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">-->
<a href="{$lang_rewrite_urls.$indice_lang|replace:''|'grandcoralausralia'} " title="{$language.name}">  <!--replace with this link-->
 
{else}
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
{/if}
 
{/if}
<!-- insert link here -->
 
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
<!-- end of insert  link here -->
{$language.iso_code}
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
 
{/foreach}
<div class="language-right"> </div>
</ul>
 
</div>
 
 
<script type="text/javascript">
$(document).ready(function () {
$("#countries").mouseover(function(){
$(this).addClass("countries_hover");
$(".countries_ul").addClass("countries_ul_hover");
});
$("#countries").mouseout(function(){
$(this).removeClass("countries_hover");
$(".countries_ul").removeClass("countries_ul_hover");
});
 
});
</script>
{/if}

 


@Vekia it did not come across. The result is blank page/server error so I replace it with the one that I post.

This is an error log from my host.

PHP Notice:  Trying to get property of non-object in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/cache/smarty/compile/8c/9f/87/8c9f872902406d627e8f482c88bb61be4afc7832.file.product-list.tpl.php on line 83PHP Notice:  Trying to get property of non-object in /var/www/vhosts/1/120622/webspace/httpdocs/grandcoralaustralia.com.au/cache/smarty/compile/8c/9f/87/8c9f872902406d627e8f482c88bb61be4afc7832.file.product-list.tpl.php on line 83

What else should I do?

 

Another two issues that I am facing are

1. Home page in English display Thai language (see attached and you can see by click on it)

2. In back office, default module language has changed to Thai. I also tried to fix by reimport the language pack under the localisation>Translations. Nothing work and nothing is solved.

Employees setting is active in English.

post-547408-0-49752400-1378860549_thumb.png

The default module has changed to be Thai

post-547408-0-53283200-1378860637_thumb.png

 

 

Edited template

 

<!-- Block languages module -->
{if count($languages) > 1}
<div id="languages_block_top">
<ul id="first-languages">
{foreach from=$languages key=k item=language name="languages"}
<li {if $language.iso_code == $lang_iso}class="selected_language"{/if}>
{if $language.iso_code != $lang_iso}
   {assign var=indice_lang value=$language.id_lang}
{if isset($lang_rewrite_urls.$indice_lang)}
<!-- <a href="{$lang_rewrite_urls.$indice_lang}" title="{$language.name}">-->
<a href="{$lang_rewrite_urls.$indice_lang|replace:''|'grandcoralausralia'} " title="{$language.name}">  <!--replace with this link-->
 
{else}
<a href="{$link->getLanguageLink($language.id_lang)}" title="{$language.name}">
{/if}
 
{/if}
<!-- insert link here -->
 
<img src="{$img_lang_dir}{$language.id_lang}.jpg" alt="{$language.iso_code}" width="16" height="11" />
<!-- end of insert  link here -->
{$language.iso_code}
{if $language.iso_code != $lang_iso}
</a>
{/if}
</li>
 
{/foreach}
<div class="language-right"> </div>
</ul>
 
</div>
 
 
<script type="text/javascript">
$(document).ready(function () {
$("#countries").mouseover(function(){
$(this).addClass("countries_hover");
$(".countries_ul").addClass("countries_ul_hover");
});
$("#countries").mouseout(function(){
$(this).removeClass("countries_hover");
$(".countries_ul").removeClass("countries_ul_hover");
});
 
});
</script>
{/if}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...