Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1818,6 +1818,10 @@ |
1819 | 1819 | 'UserGetImplicitGroups': Called in User::getImplicitGroups() |
1820 | 1820 | &$groups: List of implicit (automatically-assigned) groups |
1821 | 1821 | |
| 1822 | +'UserGetLanguageObject': Called when getting user's interface language object |
| 1823 | +$user: User object |
| 1824 | +&$code: Langauge code that will be used to create the object |
| 1825 | + |
1822 | 1826 | 'UserGetReservedNames': allows to modify $wgReservedUsernames at run time |
1823 | 1827 | &$reservedUsernames: $wgReservedUsernames |
1824 | 1828 | |
Index: trunk/phase3/includes/StubObject.php |
— | — | @@ -157,6 +157,8 @@ |
158 | 158 | $code = $wgLanguageCode; |
159 | 159 | } |
160 | 160 | |
| 161 | + wfRunHooks( 'UserGetLanguageObject', array( $wgUser, &$code ) ); |
| 162 | + |
161 | 163 | if( $code === $wgLanguageCode ) { |
162 | 164 | return $wgContLang; |
163 | 165 | } else { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -91,6 +91,7 @@ |
92 | 92 | * (bug 26217) File size is now checked before uploading in HTML5 browsers |
93 | 93 | * CSS stylesheet MediaWiki:Noscript.css is now loaded for users with JavaScript |
94 | 94 | disabled (enclosed in the head in a <noscript> tag) |
| 95 | +* Added UserGetLanguageObject hook to change the language used in $wgLang |
95 | 96 | |
96 | 97 | === Bug fixes in 1.18 === |
97 | 98 | * (bug 23119) WikiError class and subclasses are now marked as deprecated |