DemocracyClub / design-system

4 stars 1 forks source link

Language choice element #15

Open alexdutton opened 3 years ago

alexdutton commented 3 years ago

Issue and Steps to Reproduce

WDIV is targeting having a Welsh-language translation. The design system doesn't support any standard way for a user to explicitly choose a language

Expected

Somewhere there should be an optional design element for choosing a language. For WDIV we'll probably do an English / Cymraeg element in the top-right of the header bar for now, even though that would clash with the general placement of the top nav.

GeoWill commented 3 years ago

WDIV implementation happening here: https://github.com/DemocracyClub/UK-Polling-Stations/pull/3188

alexdutton commented 3 years ago

@Heydon That looks great! I've copied it across into the UK-Polling-Stations at https://github.com/DemocracyClub/UK-Polling-Stations/pull/3188 (see screenshots). As the Django set_language view takes a POST, I've replaced the <a> elements with <button>s, and added this:

  button {
    @include fontMain;
    border: 0;
    margin: 0;
    padding: 0;
    text-decoration: underline;
  }

to make it all look the same :-).