[lang=en-us] aside { display:none; }I can't see a way in CSS to detect the user agent preferred language, but you could do this in JS and add another attribute to the document or whatever.
It has been a year since I last checked, and I did use JS and 'navigator'.
However, importantly for me, I was able to avoid a trip back to the server for the few bits I wanted - introduction - in different locales.
However, it was showing me 'en-US' not 'en-GB'. There is a bug in SVG switch that means it can do languages automagically but not variants. This I can work with, but it is still something unexpected and unlikely to be fixed because nobody cares about SVG.
[1]: https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/E...
Flags are a possibility, although I only have the UK flag in my SVG sprite sheet thus far.
I will have to see if I can build a usefully stylish locale switcher that gets it right the first time due to browser locale, yet is changeable, with option stored in local storage, all inside the SVG Shadow DOM...