Today we're going to prepare ElixirStatus for internationalization with Gettext. Gettext is an established internationalization and localization system, and now there's a very good Elixir library for implementing Gettext in our applications. What's more, Phoenix 1.1 supports it by default. Let's have a look at implementing it in ElixirStatus.

I've upgraded ElixirStatus to Phoenix 1.1, and the Pull Request is in the resources section if you'd like to see what that entails. Now that that's in place, let's look at adding Gettext support to it. I've tagged my fork of the repo with before_episode_217 if you wanted to follow along.

The majority of the static text on this site lives in the shared templates, so we'll just internationalize the sidebar for now. Let's open up web/templates/shared/sidebar.html.eex:

<div class="sidebar"> <div class="container"> <div class="sidebar-header"> <a...