Since the previous bugs I was thinking would address this issue were closed (T35677#382858 and T44186#474966) I'm opening one specifically about the request to allow interface language selection by unregistered users (fix T5665) via UniversalLanguageSelector.
On our biggest multilingual wikis, Commons and Wikidata, the (monolingual) cache gets bypassed by using a gadget which makes everyone use the uselang URL parameter. Hence, as discussed in T114662, there are no significant performance problems with making the cache more permissive.
Using Commons' AnonymousI18N.js globally is not feasible until we can have central gadgets to deploy it (T31272: Implement Gadgets 2.0).
Such a feature would help e.g. on this discussion w:pt:Wikipédia:Esplanada/propostas/Uso do português de Portugal, pt-PT (4mar2012)
Interface language selection is only available to registered, logged-in users on Wikimedia projects. This is especially problem for multilingual projects including Wikisource, Wikidata and Commons.
Some wikis use workarounds to simulate this feature, but those do not scale and increase our technical debt.
Language selection (both manual and automatic) has been implemented in UniversalLanguageSelector and is already in use (both registered and unregistered) by many third party wikis, given it is enabled by default.
This issue has been discussed before, but due to unclear status of ownership (language? editing? reading?) and unclear status of blockers has stalled it. The main issue seems to be making some trade-offs to work within the current caching infrastructure.
There are two directions that allow gradually going towards the ideal end state.
- Enable manual language selection
- Enable automatic language selection
- Enable for multilingual wikis
- Enable for all wikis
- Add support for varying caches by value of language cookie.
- Enable manual language selection for multilingual wikis
- Evaluate feasibility of extending based on increase in resource usage and discuss again
The way forward from here could be
- Stop expanding
- Expand to non-multilingual wikis
- Try out automatic language selection on a small multilingual wiki 
- T44186: Anonymous users can't pick language on wikidata.org
- T3135: Interface language on multilingual Wikimedia projects should default to browser language preferences
Similar feature requests:
- T58464: Allow anonymous users to change interface language on Wikimedia wikis with ULS
- T161517: Allow anonymous users to change interface language on Commons with ULS
- T149419: Interface language selection for unregistered users on Wikimedia projects
- T134592: Allow setting the UI to a language other than English for anonymous users
Discussion of the technical background, Varnish caching: T233609: [SPIKE 4hrs] What is technically feasible in terms of logged-in/logged-out users?