

Liveview phoenix update#
However, when I have previously implemented language switching for a standard Phoenix application, compared with frontend-only Elm, needing to make a request back to the server to change the application locale means that a bit more time is needed before the update is visible on screen.

The blog post goes through different methods I used to get internationalisation ( i18n) working, but, in my opinion, the options in Elm as of this writing are not quite as nice as Elixir’s gettext- based API. Refresh the page, and you will see that your choice of language is remembered.If you select a different language, the language of the page content and title will change, and the list of selectable languages in the dropdown menu will update.Click the current language again, or anywhere else on the page, and the menu closes.Click on the current language, and the menu opens, showing a list of selectable languages.The page is deployed here, and you can find the code here, but to save a click, the animated GIF above shows all of its use cases: In a previous blog post, Runtime Language Switching in Elm, I re-created the Tachyons Full Screen Centered Title component documentation page in Elm, and added a language dropdown menu to change the page language. Internationalisation with Phoenix Live Layouts.Internationalisation with Phoenix LiveComponents.Internationalisation with Phoenix LiveView.This blog post is the first in a series on the creation of a small I18n application using Phoenix LiveView, which updates page content based on the language chosen from a dropdown menu:
