Index: trunk/extensions/Storyboard/tags/Storyboard/Storyboard_body.php |
— | — | @@ -29,7 +29,8 @@ |
30 | 30 | * TODO: add language filter |
31 | 31 | */ |
32 | 32 | public static function render( $input, array $args, Parser $parser, $frame ) { |
33 | | - global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight; |
| 33 | + global $wgJsMimeType, $wgScriptPath, $wgStylePath, $wgStyleVersion, $wgContLanguageCode; |
| 34 | + global $egStoryboardScriptPath, $egStoryboardWidth, $egStoryboardHeight; |
34 | 35 | |
35 | 36 | // TODO: Combine+minfiy JS files, add switch to use combined+minified version |
36 | 37 | $parser->getOutput()->addHeadItem( |
— | — | @@ -44,6 +45,13 @@ |
45 | 46 | $width = StoryboardUtils::getDimension( $args, 'width', $egStoryboardWidth ); |
46 | 47 | $height = StoryboardUtils::getDimension( $args, 'height', $egStoryboardHeight ); |
47 | 48 | |
| 49 | + $languages = Language::getLanguageNames(); |
| 50 | + if ( array_key_exists( 'language', $args ) && array_key_exists( $args['language'], $languages ) ) { |
| 51 | + $language = $args['language']; |
| 52 | + } else { |
| 53 | + $language = $wgContLanguageCode; |
| 54 | + } |
| 55 | + |
48 | 56 | $output = Html::element( 'div', array( |
49 | 57 | 'class' => 'storyboard', |
50 | 58 | 'style' => "height: $height; width: $width;" |