Add language picker

This also contains the changes in #1912, so the diff should simplify a bit once that's merged.

Some commentary inline on the remaining rough spots.
looks like this is missing a newline