Member-only story
A minimalistic approach to transparently translating your application
Translating an application is not trivial but it shouldn’t be complicated. Using existing tools, we can flag the text that needs to be translated and extract it into resource files. Such files will be populated, either by human translators or machine generated content, and then the translation software will transparently do the rest. ¡Vamos alla!

There is a set of features we will generally be interested in when setting up a translation system. Firstly we want the application code to remain agnostic about the translation process. Ideally we want to write the code in the default language (e.g. english) and let the translations be resolved during runtime, depending on the user selected language.
Secondly we will want to minimize the overhead of extracting the translations into resource files. If we have a system in place to parse the code, detect translatable text and extract it into the resource files automatically, we can focus on writing code without having to manually maintain JSON files.
Finally we will want the translation to be dynamic. If we are translating a client app there is no reason for the translation to require a page reload. We should be able to translate the static texts dynamically, without altering the state of the application. The only thing we need are the…