Index: trunk/extensions/LanguageSelector/LanguageSelector.php |
— | — | @@ -55,6 +55,11 @@ |
56 | 56 | */ |
57 | 57 | $wgLanguageSelectorShowCode = false; |
58 | 58 | |
| 59 | +/** |
| 60 | + * Show all languages defined, not only those with a language files (Language::getLanguageNames( <true/false> )) |
| 61 | + */ |
| 62 | +$wgLanguageSelectorShowAll = false; |
| 63 | + |
59 | 64 | define( 'LANGUAGE_SELECTOR_MANUAL', 0 ); #don't place anywhere |
60 | 65 | define( 'LANGUAGE_SELECTOR_AT_TOP_OF_TEXT', 1 ); #put at the top of page content |
61 | 66 | define( 'LANGUAGE_SELECTOR_IN_TOOLBOX', 2 ); #put into toolbox |
— | — | @@ -88,7 +93,7 @@ |
89 | 94 | |
90 | 95 | function wfLanguageSelectorExtension() { |
91 | 96 | wfLoadExtensionMessages( 'LanguageSelector' ); |
92 | | - global $wgLanguageSelectorLanguages, $wgLanguageSelectorDetectLanguage, $wgLanguageSelectorRequestedLanguage, $wgLanguageSelectorLocation; |
| 97 | + global $wgLanguageSelectorLanguages, $wgLanguageSelectorDetectLanguage, $wgLanguageSelectorRequestedLanguage, $wgLanguageSelectorLocation, $wgLanguageSelectorShowAll; |
93 | 98 | global $wgUser, $wgLang, $wgRequest, $wgCookiePrefix, $wgCookiePath, $wgOut, $wgJsMimeType, $wgHooks; |
94 | 99 | |
95 | 100 | $wgHooks['ParserFirstCallInit'][] = 'wfLanguageSelectorSetHook'; |
— | — | @@ -98,7 +103,7 @@ |
99 | 104 | } |
100 | 105 | |
101 | 106 | if ( $wgLanguageSelectorLanguages === NULL ) { |
102 | | - $wgLanguageSelectorLanguages = array_keys( Language::getLanguageNames( true ) ); |
| 107 | + $wgLanguageSelectorLanguages = array_keys( Language::getLanguageNames( !$wgLanguageSelectorShowAll ) ); |
103 | 108 | sort( $wgLanguageSelectorLanguages ); |
104 | 109 | } |
105 | 110 | |