GTranslate Pro not changing language attrib. in Wordpress
Oct 16, 2011 3:23 am by nanni75
Oct 16, 2011 3:23 am by nanni75
Hi Edward,
I am playing with your great plugin in wordpress and it's working just fine.
One thingh tough, which I think is a serious issue, is that translated pages in my wordpress install keep the original language definition.
On the website I am working on http://www.giochi01.com/, the default language is italian and the wordpress tag that print the language in the header.php are the following:
<html xmlns="http://www.w3.org/1999/xhtml" dir="<?php bloginfo('text_direction'); ?>" xml:lang="<?php bloginfo('language'); ?>">
<meta http-equiv="Content-language" content="<?php bloginfo('language'); ?>" />
Now, when I move into a translated page, let's say http://www.giochi01.com/ca/ or http://www.giochi01.com/el/, the above wordpress functions are still printing italian as the default language page.
Do you know how it would be possible to print the correct language attribute in the translated pages?!?
I couldn't sort it out by myself but I think it's an important point from SEO perspective.
Regards,
Giovanni
Re: GTranslate Pro not changing language attrib. in Wordpres
Oct 17, 2011 10:54 am by Edvard
Oct 17, 2011 10:54 am by Edvard
Hi,
You can remove xml:lang, and meta content-language from your template. They are not important.
But if you want to set appropriate language code, you can read this: url-language-code-t320.html and use
<?php echo $_GET['glang']; ?>
instead of
<?php bloginfo('language'); ?>
SIMILAR TOPICS
Gtranslate Multisite | Feb 12, 2019 7:27 am | Replies: 1 | Post by: infact_dat |
Gtranslate: Error with number | Feb 20, 2019 1:20 am | Replies: 1 | Post by: infact_dat |
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not defined | Feb 22, 2019 12:34 pm | Replies: 1 | Post by: oase |
wordpress amp link not translate | Dec 31, 2016 10:11 am | Replies: 12 | Post by: besybuy |
Add-on gtranslate no longer works | Feb 2, 2019 6:01 am | Replies: 1 | Post by: DarylDixon |