Multilingual architecture for an open-source platform

Designed an i18n architecture for an open-source project supporting 11 languages. A new language can be added in 30 minutes with no coding required.

Multilingual architecture for an open-source platform

Challenge

NextOrders is an open-source delivery platform designed for different countries. The standard JSON translation approach gets messy fast: keys go out of sync and contributors can't add their language without diving into the codebase. I needed translation to be a translator's job, not a programmer's.

Technical details

Solution

I built i18n on nuxt-i18n: one JSON file per language, flat keys with namespaces. All keys typed via TypeScript - the IDE suggests them and errors on missing translations. Made a locale-template.json with comments - a contributor copies it, renames, translates. Pluralization via ICU rules - Russian, Arabic, any language works out of the box. Prefix routing, auto language detection, hreflang tags, and RTL support via CSS logical properties.

Result

The platform supports 11 languages. Contributors from 5 countries added their own languages - averaging 30 minutes for 120 keys. Not a single translation PR needed help with code.

148 views