Last modified: 2013-10-06 09:04:08 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T22807, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 20807 - Enable site logo displaying according to user language
Enable site logo displaying according to user language
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
Extensions requests (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-25 14:07 UTC by Liangent
Modified: 2013-10-06 09:04 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Liangent 2009-09-25 14:07:28 UTC
This can allow users to create different logos for different languages.
Comment 1 Brion Vibber 2009-09-25 16:50:59 UTC
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).
Comment 2 Danny B. 2009-09-27 09:32:55 UTC
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.
Comment 3 Brion Vibber 2009-09-28 19:02:42 UTC
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">)
Comment 4 Mark A. Hershberger 2011-01-27 20:37:08 UTC
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/
Comment 5 Niklas Laxström 2013-04-03 07:35:17 UTC
This feature looks suitable for an extension rather than core.
Comment 6 Kunal Mehta (Legoktm) 2013-10-06 08:58:17 UTC
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';
	}
};
Comment 7 Daniel Friesen 2013-10-06 09:01:57 UTC
(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.
Comment 8 Kunal Mehta (Legoktm) 2013-10-06 09:04:08 UTC
(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.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links