Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Example of internationalisation (I18n) in a Phoenix app using LiveView

License

Notifications You must be signed in to change notification settings

paulfioravanti/phx_i18n_example

Repository files navigation

Phoenix LiveView I18n Example

An example implementation of language switching using Phoenix LiveView.

It was created as part of a series of blog posts I wrote about LiveView:

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.

Setup

git clone https://github.com/paulfioravanti/phx_i18n_example.git
cd phx_i18n_example
mix deps.get
npm install --prefix assets

Run

mix phx.server

Open http://localhost:4000

Tests

mix test

Watch

mix test.watch