function isRTL() {
return self::$dataCache->getItem( $this->mCode, 'rtl' );
}
+
+ /**
+ * Return the correct HTML 'dir' attribute value for this language.
+ * @return String
+ */
+ function getDir() {
+ return $this->isRTL() ? 'rtl' : 'ltr';
+ }
+
+ /**
+ * Return 'left' or 'right' as appropriate alignment for line-start
+ * for this language's text direction.
+ *
+ * Should be equivalent to CSS3 'start' text-align value....
+ *
+ * @return String
+ */
+ function alignStart() {
+ return $this->isRTL() ? 'right' : 'left';
+ }
+
+ /**
+ * Return 'right' or 'left' as appropriate alignment for line-end
+ * for this language's text direction.
+ *
+ * Should be equivalent to CSS3 'end' text-align value....
+ *
+ * @return String
+ */
+ function alignEnd() {
+ return $this->isRTL() ? 'left' : 'right';
+ }
/**
* A hidden direction mark (LRM or RLM), depending on the language direction
}
# Fill a MagicWord object with data from here
- function getMagic( &$mw ) {
+ function getMagic( $mw ) {
if ( !$this->mMagicHookDone ) {
$this->mMagicHookDone = true;
wfRunHooks( 'LanguageGetMagic', array( &$this->mMagicExtensions, $this->getCode() ) );
/**
* Perform output conversion on a string, and encode for safe HTML output.
- * @param $text String
- * @param $isTitle Bool -- wtf?
+ * @param $text String text to be converted
+ * @param $isTitle Bool whether this conversion is for the article title
* @return string
* @todo this should get integrated somewhere sane
*/