Forum Archive - GTranslate Pro not changing language attrib. in Wordpress

GTranslate Pro not changing language attrib. in Wordpress
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, the default language is italian and the wordpress tag that print the language in the header.php are the following: <html xmlns="" 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 or, 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
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'); ?>


Gtranslate MultisiteFeb 12, 2019 7:27 amReplies: 1Post by: infact_dat
Gtranslate: Error with numberFeb 20, 2019 1:20 amReplies: 1Post by: infact_dat
GTranslate 3.7.4, Joomla 3.9.3 - doGTranslate is not definedFeb 22, 2019 12:34 pmReplies: 1Post by: oase
wordpress amp link not translateDec 31, 2016 10:11 amReplies: 12Post by: besybuy
Add-on gtranslate no longer worksFeb 2, 2019 6:01 amReplies: 1Post by: DarylDixon

Try GTranslate with a free 15 day trial