Last modified: 2013-10-06 09:04:08 UTC
This can allow users to create different logos for different languages.
The logo URL isn't really a localization string; it's site-specific and belongs in the general administration interface (which doesn't exist yet).
Multilingual projects such as Wikispecies (besides many others outside WMF) which have localized names for project would utilize some such feature to display logo according to user language. Changing the summary to more general and reopening. If closing will follow, I'd suggest rather LATER than WONTFIX.
Hmmm... note that as a hackaround this could be done via site JS for now (check wgUserLanguage and swap out the URL on the logo). Site CSS can also override the logo but I don't think user language is exposed in a way that CSS can consistently get it (the content lang is used on <html lang="xx">)
Related to Bug#14594 which involves different logos for different skins. While I understand that we have bits of language in different logos, I should note that the golden arches remain the same even in languages that do not use the Latin alphabet: http://www.mylifestylediet.com/blog/latest-news/golden-arches-in-japan-expand-burger-selection-and-calories/
This feature looks suitable for an extension rather than core.
There are obviously some caching issues, but this seems to work: $wgExtensionFunctions[] = function() { global $wgUser, $wgLogo; switch ( $wgUser->getOption( 'language' ) ) { case 'en': $wgLogo = 'en-logo'; break; case 'fr': $wgLogo = 'fr-logo'; break; default: $wgLogo = 'default-logo'; } };
(In reply to comment #6) > There are obviously some caching issues, but this seems to work: > > $wgExtensionFunctions[] = function() { > global $wgUser, $wgLogo; > switch ( $wgUser->getOption( 'language' ) ) { > case 'en': > $wgLogo = 'en-logo'; > break; > case 'fr': > $wgLogo = 'fr-logo'; > break; > default: > $wgLogo = 'default-logo'; > } > }; Ugh, $wgUser and varying config on request state. Please use the SkinTemplateOutputPageBeforeExec to modify logopath instead of using that hack.
(In reply to comment #7) > Ugh, $wgUser and varying config on request state. > > Please use the SkinTemplateOutputPageBeforeExec to modify logopath instead of > using that hack. [[m:Cunningham's Law]] strikes again! Thanks, your solution is much better.