PDA

View Full Version : Already done Addition of rel="alternate" tags



tavenger5
28-12-12, 02:58
Can an option be added to add tags to translated pages:

<link rel="alternate" hreflang="es" href="http://site.com/es/thread_etc.html" />

More info here: rel="alternate" hreflang="x" - Webmaster Tools Help (http://support.google.com/webmasters/bin/answer.py?hl=en&answer=189077)

Fabiano
29-12-12, 12:57
Excellent!

vBET
29-12-12, 14:17
Accepted :)

tavenger5
29-12-12, 14:38
Great! In the meantime could you tell me how this could be added manually if it is not too complicated?

Marcin Kalak
31-12-12, 12:50
When we do that, and if it's a simple change then we will publish a quick fix for people who will not want to wait for the new release.

tavenger5
31-12-12, 20:39
great, thanks!

tavenger5
01-02-13, 21:06
I would really like to see this sooner than later as it may help with this issue I'm having: http://www.vbenterprisetranslator.com/forum/vbet4-troubleshooting/3347-major-issue-duplicate-content.html

Marcin Kalak
13-02-13, 10:36
Quick fix for this feature is:

Open file includes/vbenterprisetranslator_functions_hooks.php
Find code:

if (!VBET_IS_ACTUAL_IGNORED && (!$vbulletin->options['vbenterprisetranslator_flags_guestsonly'] || !$vbulletin->userinfo['userid'])) {
PUT AFTER it this code:

require_once(DIR. '/includes/vbenterprisetranslator_functions_lang.php');
require_once(DIR. '/includes/vbenterprisetranslator_functions_url.php');
$active = vbet_getActiveTranslations();
$host = substr($vbulletin->options['bburl'],0,strlen($vbulletin->options['bburl'])-strlen($vbulletin->options['vbenterprisetranslator_forumdir']));
foreach ($active as $key => $value)
{
$template_hook['headinclude_css'] .= '<link rel=\'alternate\' hreflang=\''.$key.'\' href=\''.$host.vbet_createURL($key).'\' />';
}

This quick fix will add "alternate" tags to all your pages. In the next release this option will be configurable. In the next release we will add this feature.

tavenger5
17-02-13, 14:21
thank you! really appreciate it!

tavenger5
17-02-13, 14:31
hrm, I was under the impression that the base language should not be an 'alternate' page.

tavenger5
17-02-13, 14:37
hrm, I was under the impression that the base language should not be an 'alternate' page.

Actually, I think I'm wrong...


If you have multiple language versions of a URL, each language page in the set must use rel="alternate" hreflang="x" to identify all language versions including itself. For example, if your site provides content in French, English, and Spanish, the Spanish version must include a rel="alternate" hreflang="x" link for itself in addition to links to the French and English versions. Similarly the English and French versions must each include the same references to the French, English, and Spanish versions

Marcin Kalak
18-02-13, 18:53
As I read, on all pages should be links to all language versions and so it is done.

Vetall
24-02-17, 07:50
Good day!

performed this modification hreflang to vBET Translator 4.7.2

google webmasters error:
On the page with the language code en no backlinks

Marcin Kalak
28-02-17, 17:47
On which page you have this issues? When you see this message? Can you send the link to the example of an issue? Please create a new topic with a detailed description of this issue.

Vetall
28-02-17, 18:29
Thank you!

Created a new topic:
http://www.vbenterprisetranslator.com/forum/vbet4-troubleshooting/4542-addition-of-rel%3Dalternate-tags.html#post17107

AfrikaansAlbanianArabicBelarusianBulgarianCatalanChineseCroatianCzechDanishDutchEnglishEstonianFilipinoFinnishFrenchGalicianGermanGreekHaitian CreoleHebrewHindiHungarianIcelandicIndonesianIrishItalianJapaneseKoreanLatvianLithuanianMacedonianMalayMalteseNorwegianPersianPolishPortugueseRomanianRussianSerbianSlovakSlovenianSpanishSwahiliSwedishTaiwaneseThaiTurkishUkrainianVietnameseWelshYiddish
Languages translations supported by vBET 4.9.2