Question on how to set language meta tags.
Oct 21, 2011 7:14 pm by nemmar
Oct 21, 2011 7:14 pm by nemmar
Is there a way to have the correct language meta tags set for each translated language page?
For example, my translated pages have this in the head tag: html lang="en-gb" xml:lang="en-gb"
Does this matter for SEO or for AdSense ads being relevant and in the same language as the translated pages?
The AdSense ads showing up on the translated pages are all in English instead of matching the translated language of the page. Is Google AdSense not able to detect the correct language of the translated page due to the language meta tag being English?
Re: Question on how to set language meta tags.
Oct 22, 2011 3:24 pm by Edvard
Oct 22, 2011 3:24 pm by Edvard
Hi,
That tags don't matter at all. You can remove them from your template.
Re: Question on how to set language meta tags.
Nov 5, 2011 3:54 am by nemmar
Nov 5, 2011 3:54 am by nemmar
Edvard,
I checked my Gtranslate links to see how they pages look since I've had it installed on my site for over a month. The navigation menu links and the meta tags are getting translated, but most of the articles are still in English. How come that's happening? How long does it normally take for the full pages to be translated and cached so they show up as completely translated when their indexed or clicked?
Could the problem be the en-gb language tag in the headers? I know you said the following line above the head tag in my Joomla site can be removed:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
But I don't know if removing that line of code will affect other aspects needed for the site. I read these two post on your forum and was wondering if it's better if I tried these solutions:
gtranslate-pro-not-changing-language-attrib-wordpress-t937.html#p4026
url-language-code-t320.html
Let me know what your advice is.
Thanks!!
Re: Question on how to set language meta tags.
Nov 6, 2011 5:13 pm by Edvard
Nov 6, 2011 5:13 pm by Edvard
Please write the page URL which is not translated.
If you check the source of https://gtranslate.io you will see that there are no lang attributes for html tag.
Re: Question on how to set language meta tags.
Nov 8, 2011 6:17 pm by nemmar
Nov 8, 2011 6:17 pm by nemmar
Edvard,
The navigation menu links and the meta tags are getting translated, but most of the articles are still in English. How come that's happening? You can see this same issue is happening with most of the articles on the site.
In the source code of the pages the language ref is above the head tag at the top of the pages:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb" lang="en-gb" >
<head>
Let me know if my GTranslate settings need to be adjusted. GTranslate is probably installed perfectly since you installed it for me when I purchased the extension on October 5.
Thanks for any advice on fixing this!!
Re: Question on how to set language meta tags.
Nov 9, 2011 12:26 pm by Edvard
Nov 9, 2011 12:26 pm by Edvard
Try to use this instead in your .htaccess file
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_translation=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_translation=1 [L,QSA]
It will force the non-translated parts of your page to forcefully translated.
Re: Question on how to set language meta tags.
Nov 9, 2011 2:30 pm by nemmar
Nov 9, 2011 2:30 pm by nemmar
Edvard,
Okay, I replaced the following code in the .htacess file with the code in your post reply:
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_no_api=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_no_api=1 [L,QSA]
1) Can you tell me why this problem occurred of my article content not being translated after months of using GTranslate?
2) You installed the GTranslate on my site yourself. Can you tell me what went wrong and why your installation did NOT work for months?
3) How do I know that this change of replacing the .htaccess file GTranslate config will actually work and now all my site pages will be translated into each language - and not partial page translations like has happened for months?
My worry about your installation of GTranslate from months ago was about my site getting a Google duplicate content penalty. You can see from my posts months ago on this forum I was asking you why my site pages article text were not translating from English - which leads to duplicate content penalties for Google! You replied that the pages were going to translate correctly - but they didn't. So I need to know for sure that GTranslate is working and WILL CONTINUE to work correctly so I don't have to "babysit" the translations and check them periodically.
Let me know.
Re: Question on how to set language meta tags.
Nov 9, 2011 2:38 pm by Edvard
Nov 9, 2011 2:38 pm by Edvard
The thing is that somewhere on your site you have some text which is not possible to translated to any language. When the parser comes to that text and it is not able to translate it it stops the further page translation, but if you add force_translation, it will keep on going.
The GTranslate Pro worked for your site and a lot of pages are indexed by Google. You can check that the titles and meta descriptions of your pages were translated and that is the most important thing for Google.
Just to be sure, check that currently you have this code in .htaccess file, seems that you also had force_no_api parameter.
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_no_api=1&force_translation=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_no_api=1&force_translation=1 [L,QSA]
You cannot be penalized by Google, since it doesn't penalize you if you copy content from your own site.
Re: Question on how to set language meta tags.
Nov 9, 2011 3:07 pm by nemmar
Nov 9, 2011 3:07 pm by nemmar
Edvard,
Okay, now I'm really confused??? I copied the .htaccess code from your post in this thread that you posted today. Here is what I NOW have in my .htaccess file related to GTranslate (there are other lines after this in .htaccess but it's related to Joomla and were there when you installed GTranslate on my site):
RewriteEngine On
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_translation=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_translation=1 [L,QSA
So the newest code in your latest post has something different, including the "force_no_api=1&force_translation" line. So do I need to replace the .htaccess code I have listed in this post, with the code you posted in your last reply with the "force_no_api=1&force_translation" line in it?
There is nothing unusual about the articles on my site. They are standard text articles pasted into the Joomla text editor and posted from the Joomla MySQL database. So if there's some abnormal text on my site that you're saying prevented translations, can you tell me where it is? Because most of the articles I checked were NOT being translated, just the menus and links were translated but NOT the article text. I don't have any custom code/scripting on my site so it's just a normal Joomla site. I don't know where this "mystery" text is located, but maybe you can find it and tell me where it is.
You cannot be penalized by Google, since it doesn't penalize you if you copy content from your own site.
Edvard, I appreciate you helping me resolve this issue since I think GTranslate could be a great program to get my site automatically translated and indexed into the 58 foreign languages. So if you can fix this issue I will be very happy and grateful for your help. I really don't want to take a chance and trust when you write "you can't be penalized by Google".
Re: Question on how to set language meta tags.
Nov 9, 2011 7:19 pm by nemmar
Nov 9, 2011 7:19 pm by nemmar
Edvard,
I added the last .htaccess code you posted into my .htaccess file:
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_no_api=1&force_translation=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_no_api=1&force_translation=1 [L,QSA]
Can you tell me if this is the correct code (above)?
Or should I use the other .htaccess code (below) that you posted in a prior reply:
# gtranslate config
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)/(.*)$ /$1/$3 [R=301,L]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/([a-z]{2}|zh-CN|zh-TW)$ /$1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)/(.*)$ /gtranslate/translate.php?lang=$1&url=$2&force_translation=1 [L,QSA]
RewriteRule ^([a-z]{2}|zh-CN|zh-TW)$ /gtranslate/translate.php?lang=$1&force_translation=1 [L,QSA]
Let me know. Thanks.
Re: Question on how to set language meta tags.
Nov 10, 2011 12:04 pm by Edvard
Nov 10, 2011 12:04 pm by Edvard
Above code is OK.
If you want to find the mystery text, you can turn on the debug mode and find it in the debug.txt file.
Let's just go on the well-known, well-established fact that Google does NOT want duplicate content URLs showing up in their search results.
You don't have 2 URLs which content is identical for 100% and I'm sure what I say.
SIMILAR TOPICS
Large numbers of crawl errors with double language code | Jan 24, 2019 1:43 am | Replies: 1 | Post by: natastna2 |
Translate website to any specific language, on page load | Jan 19, 2019 6:49 am | Replies: 1 | Post by: Leaon7756 |
Graphic translation for every language is missing | Dec 19, 2018 7:54 am | Replies: 1 | Post by: Daryl Dixon |
How to remove mobile Language Select Button transparency | Dec 5, 2018 10:06 pm | Replies: 10 | Post by: JeffTR |
Change language automatically | Nov 26, 2018 9:29 pm | Replies: 3 | Post by: Antilb |