<?php
/**
- * Derivative context for resource loader modules.
+ * Derivative context for ResourceLoader modules.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
public function setLanguage( $language ) {
$this->language = $language;
// Invalidate direction since it is based on language
- $this->direction = self::INHERIT_VALUE;
+ $this->direction = null;
$this->hash = null;
}
if ( $this->direction === self::INHERIT_VALUE ) {
return $this->context->getDirection();
}
+ if ( $this->direction === null ) {
+ $this->direction = Language::factory( $this->getLanguage() )->getDir();
+ }
return $this->direction;
}