OutputPage: Only set <link hreflang=x-default> on wiki/pages with variants
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 7 Jul 2015 10:32:03 +0000 (11:32 +0100)
committerKrinkle <krinklemail@gmail.com>
Tue, 7 Jul 2015 10:32:46 +0000 (10:32 +0000)
commit208983b6d1f5383b4d58b31ca092e87605e05e0d
tree4474063083eb64838389c89871fc0a9af8dccb53
parent9771b003756bfe3825bf7427efca6393ed96597b
OutputPage: Only set <link hreflang=x-default> on wiki/pages with variants

Follows-up 91d8a51825.

Having the default variant advertised seems useful, however for
wikis and/or pages that have no variants or translated versions,
outputting this header doesn't seem useful.

https://support.google.com/webmasters/answer/189077 doesn't
justify sending it unconditionally.

To try out, setting $wgLanguageCode = 'zh'; will result in all
pages having hreflang=x-default and all variants. And setting to
'en' or 'de' will result in none of those link tags.

Change-Id: I21cd072534ae1df960209e657b19c96889ece27c
includes/OutputPage.php