Jump to content

Extension talk:LanguageSelector

About this board

Previous page history was archived for backup purposes at Extension talk:LanguageSelector/LQT Archive 1 on 2015-07-10.
Jprodina (talkcontribs)

For logged-in user the change of language lasts only for the current page. Display of next page brings the language back to the wiki language.

Is this intended behaviour?

Reply to "Logged-in user"
Specik (talkcontribs)

Sorry for the poor English, it is not my first language. As is, LanguageSelector doesn't automatically convert page contents to Chinese variants using the built-in ZhConversion.php. I added the following line below $user->setOption( 'language', $requestedLanguage ); in LanguageSelector.php: $user->setOption( 'variant', $requestedLanguage );

Now the extension should convert the page content between Chinese variants, in addition to the UI elements. In theory it should also work for other languages with built-in language conversion.

Reply to "Chinese variants"

{{#switch:{{int:Lang}}| doesn't work for log-out visitor

7
Amqui (talkcontribs)

Good day, I use {{#switch:{{int:Lang}}|en=blabla|fr=blabla}} to have the same page displays in the language chosen by the visitor. With &setlang=fr or en in the url, it works for log-in user. However, for visitor not logged in, even if they add &setlang=fr in the url, the page remains in English and only the title is in French. It had been tested on Google Chrome. And the tested page is http://wikimedia.ca/w/index.php?title=Projects/National_Contribution_Month&setlang=en or http://wikimedia.ca/w/index.php?title=Projets/Mois_national_de_la_contribution&setlang=fr. How come? Thanks,

MarkAHershberger (talkcontribs)

The parameter you want is "uselang", not "setlang".

Bawolff (talkcontribs)

setlang is a parameter used by certain extensions (Language Selector? maybe) where uselang is part of core

Possibly the language selector extension is configured to not work for anons to prevent issues with squid caching.

MarkAHershberger (talkcontribs)

All I know is that their site did change the displayed page when I altered the URL to uselang instead of setlang.

Bawolff (talkcontribs)

Hmm, yeah. Something looks borked with that extension. Only about half the messages seem to change with setlang. I would guess that whatever hook Language selector extension is using to muck about with $wgLang is being called to late (or the extension only changes some of the RequestContext objects (not all) or something like that).

Siebrand (talkcontribs)

"setlang" is a URL parameter provided by Extension:UniversalLanguageSelector. In all wiki's hosted by Wikimedia Foundation, persistent language selection for anonymous users is disabled. This feature is enabled by default in ULS, but disabled in Wikimedia wikis because of worries about cache fragmentation. "uselang" is a URL parameter provided by core, that only works for a single page view.

Bawolff (talkcontribs)

I don't think that is the issue. User was claiming that setlang was succesfully changing the language on only part of the interface for anons. If setlang was disabled for anons on his/her install, I would expect it to change none of the interface language.

Reply to "{{#switch:{{int:Lang}}| doesn't work for log-out visitor"
There are no older topics