Last modified: 2014-11-07 11:54:44 UTC
When using something like the Universal Language Selector to give anonymous users a persistent user language, the user should just keep that language when creating an account. Technically, this means initializing the new user's language setting to the current UI setting.
Rohit, I know you were looking at this bug, so I'm assigning it to you in case someone else thinks about working on it. If you drop it, unassign yourself and no hard feelings :) Remember to come and hang out in #mediawiki if you need any help!
Unassigning. No apparent progress.
Maybe I'm confused, but doesn't the account creation form already do this? (In LoginForm::addNewAccount on line 247 it sets the user's language.)
"A" language is set, being uselang, per: 105: $this->mLanguage = $request->getText( 'uselang' ); However, with for example ULS, there are other options that determine the language. setlang could be one, the value of the language cookie or the value of the Accept-Language.
Aha I see.
[replacing wikidata keyword by adding CC - see bug 56417]
Hi. Just to clarify: this bug is to address the fact that user language preference is not set upon account creation after choosing a language via the ULS? So the changes should be done in ULS, not SpecialUserLogin?
(In reply to Stephen Zhou from comment #7) > Hi. Just to clarify: this bug is to address the fact that user language > preference is not set upon account creation after choosing a language via > the ULS? So the changes should be done in ULS, not SpecialUserLogin? No. Comment 0 says "something like the Universal Language Selector", more common in the wild is setting [[mw:uselang]]. The login/signup process itself needs to set in the language preference of the newly created account whatever language is the interface language.
Ah, I see. Makes sense now. It looks like uselang is already handled, so what needs to be handled in addition is setlang, the wikilanguage cookie, and Accept-Language value like Siebrand mentioned. The cookie one was not hard so I'll just figure out the other two. Thanks!
Change 120475 had a related patch set uploaded by Nemo bis: Tries to use wikilanguage cookie, HTTP request Accept Header, and then the get preferred variant in that order https://gerrit.wikimedia.org/r/120475