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

Latest commit

 

History

History
41 lines (28 loc) · 2.11 KB

0013-internationalization-system-server-side.md

File metadata and controls

41 lines (28 loc) · 2.11 KB

Use Django Translation for server side internationalization

  • Status: Decided
  • Deciders: Team consensus
  • Date: 10/19/21

In order for unemployment compensation to be accessible to all who qualify, people who speak various languages must be able to use and understand the presentation language. Although the initial MVP will only be in English, it makes sense to integrate a system for internationalization during this MVP stage and to apply it first using English. It would be significantly more overhead to apply it later, and once the system and patterns are set up it will be low effort to utilize it.

Because the application utilizes server-generated templates for the home page and emails we need a system for internationalization, taking into consideration what system is used on the client-side.

Considered Alternatives

Option 1: Django Translation

  • + it's already built in to Django
  • + can address template internationalization for our static pages
  • + provides utilities to extract the translation strings into a message file (.po) which translators can fill in easily
  • - Developers would need to learn a different internationalization system than for the frontend

Option 2: i18next-backend

  • + if using react-i18next on the client side, using the i18next tool on the server side would have matching patterns
  • - backend usage of i18next would need to be in node.js, which we aren't using right now

Decision Outcome

Django Translation: As a built-in utility, it is simple to implement and does not require adding use of node.js. There are few static pages (2-3) and likely minimal emails to which to apply the translation on the server side, so the overhead of using a different system than the frontend is minimal.

Resources