An example implementation of language switching using Phoenix LiveView.
It was created as part of a series of blog posts I wrote about LiveView:
- Internationalisation with Phoenix LiveView
- Internationalisation with Phoenix LiveComponents
- Internationalisation with Phoenix Live Layouts
It re-implements Tachyons' Full Screen Centered Title component documentation page in Phoenix, adds a language dropdown menu, and allows you to switch the language of the message displayed.
The tests were created as part of another blog post I wrote about using Cypress:
You can find the Cypress integration test suite for this application here.
It is a sibling repository to Elm I18n Example, which I created to also re-implement the same page, but in Elm.
git clone https://github.com/paulfioravanti/phx_i18n_example.git
cd phx_i18n_example
mix deps.get
npm install --prefix assets
mix phx.server
mix test
mix test.watch