With a bit of evil trickery, I managed to merge the Commons uselang= language trick with the ULS so that it can be made to "work" even for anonymous users on wikimania2017wiki. (Strictly speaking, this uses the ULS as an UI for the Commons language trick).
- it relies on being able to wm.config.set the (possibly redundantly) initialize the ULS; and
- it relies on being able to simply overwrite wm.uls.changeLanguage with another function.
This seems brittle, but useful enough that there should/could be a proper hook in ULS to implement anon user behaviour? (By (a) turning on the selector as though wgULSAnonCanChangeLanguage were true and (b) specify what happens when an anon sets language).
Code that does this: https://wikimania2017.wikimedia.org/w/index.php?title=MediaWiki:AnonymousI18N.js&oldid=692
(Look in particular at the start of the init() function)