Thread:Project:Support desk/ Resolved Adding global meta tag for Google Website Translator

Extension:MetaTags lets you add custom meta tags to individual pages. I needed to add a meta tag to all pages. I don't know whether this is the right way, or best way to do this.

Google Website Translator is a widget that embeds a drop down menu on each page, to let visitor select a language into which to translate the page (demo: see "4. Google Translate Bar"). The wizard creates a meta tag, and HTML snippet.

Using MedaiWiki 1.23.5, to add the meta tag, I added the following snippet to my LocalSettings.php file (first 4 lines already exist):

if ( !defined( 'MEDIAWIKI' ) ) { exit; }
 * 1) Protect against web entry

$wgExtensionFunctions[] = 'globalMetaGoogleXlate'; function globalMetaGoogleXlate{ global $wgOut; $wgOut->addMeta ( 'google-translate-customization', 'cc5b9e13f99-4d62c779b7cf64cb-g83044656fb7362a2-13'); } Adds the following meta tag in &lt;head>..&lt;/head> 

To embed the generated snippet into my page (in my case, the Vector skin), I made a backup the files skins/Vector.php, and found a suitable location to add it.