Coder Social home page Coder Social logo

paulfioravanti / phx_i18n_example Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 0.0 1.21 MB

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

License: MIT License

Elixir 85.53% CSS 0.10% JavaScript 9.72% HTML 4.65%
elixir phoenix-framework i18n liveview gettext pubsub phoenix-liveview phoenix-livecomponents internationalisation phoenix-live-layouts

phx_i18n_example's Introduction

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

phx_i18n_example's People

Contributors

paulfioravanti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.