PrestaShop Forum

The best place in the world to ask questions about PrestaShop and get advice from our passionate community!

PrestaShop Forum

Jump to content

 

Prevent page title duplication for multiple languages

4 replies to this topic
#1
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
I noticed that all my pages have the same title for all the languages I have installed.

Google (and other search engines as well) don't like to see identical page titles for different pages.

I decided to add to each page title "(language name)" at the end to prevent duplications.

This can be done by replacing the current <title> line in /themes/prestashop/header.tpl #4) with the following line:

<title>{$meta_title|escape:'htmlall':'UTF-8'} {foreach from=$languages item=language}{if $language.iso_code == $lang_iso} ({$language.name}){/if}{/foreach} </title>


You can see it working on my site http://www.presto-changeo.com/
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#2
SpyrosT

    PrestaShop Apprentice

  • Members
  • PipPip
  • 305 posts
Hey Tomerg,

I was just watching your web-page and noticed that your title shows the language once.
Do you mind sharing the new code?
Tnx

#3
tomerg3

    PrestaShop Superstar

  • US Moderators
  • 5754 posts
Edit the language name in Tools->Languages, Prestashop had it twice by default.
Posted Image
For the latest updates discount coupons and new module information follow us on Twitter , Facebook ,and tips on our Blog
Please do not send general questions via PM, that is what the forum is for...

#4
SpyrosT

    PrestaShop Apprentice

  • Members
  • PipPip
  • 305 posts
TNX Man!! I could never though that was the issue.

#5
angel2003

    PrestaShop Newbie

  • Members
  • Pip
  • 2 posts

View Posttomerg3, on 22 November 2009 - 07:22 AM, said:

I noticed that all my pages have the same title for all the languages I have installed.

Google (and other search engines as well) don't like to see identical page titles for different pages.

I decided to add to each page title "(language name)" at the end to prevent duplications.

This can be done by replacing the current <title> line in /themes/prestashop/header.tpl #4) with the following line:

<title>{$meta_title|escape:'htmlall':'UTF-8'} {foreach from=$languages item=language}{if $language.iso_code == $lang_iso} ({$language.name}){/if}{/foreach} </title>

You can see it working on my site http://www.presto-changeo.com/

Hi there,

I have bought your translation module, and I was trying to get this working, but I can't...

I've checked on your site, and apparently it is not working too, Isn't it supposed to put the language on the title, next to the shop icon?

Give me a hint on this please.

Thanks