// IE and some other browsers use BCP 47 standards in
// their Accept-Language header, like "zh-CN" or "zh-Hant".
// We should handle these too.
- $variantBCP47 = wfBCP47( $variant );
+ $variantBCP47 = LanguageCode::bcp47( $variant );
if ( $variantBCP47 !== $variant ) {
$aloption[] = 'substr=' . $variantBCP47;
}
$pieces = array_merge( $pieces, array_values( $this->getHeadLinksArray() ) );
$pieces = array_merge( $pieces, array_values( $this->mHeadItems ) );
- $min = ResourceLoader::inDebugMode() ? '' : '.min';
// Use an IE conditional comment to serve the script only to old IE
$pieces[] = '<!--[if lt IE 9]>' .
- Html::element( 'script', [
- 'src' => self::transformResourcePath(
- $this->getConfig(),
- "/resources/lib/html5shiv/html5shiv{$min}.js"
- ),
- ] ) .
+ ResourceLoaderClientHtml::makeLoad(
+ ResourceLoaderContext::newDummyContext(),
+ [ 'html5shiv' ],
+ ResourceLoaderModule::TYPE_SCRIPTS,
+ [ 'sync' => true ]
+ ) .
'<![endif]-->';
$pieces[] = Html::closeElement( 'head' );
foreach ( $variants as $variant ) {
$tags["variant-$variant"] = Html::element( 'link', [
'rel' => 'alternate',
- 'hreflang' => wfBCP47( $variant ),
+ 'hreflang' => LanguageCode::bcp47( $variant ),
'href' => $this->getTitle()->getLocalURL(
[ 'variant' => $variant ] )
]