DEV Community

Discussion on: Internazionalization best practices

Collapse
 
rolfstreefkerk profile image
Rolf Streefkerk

The way I solved this for our app is to use ISO standard 3 character language codes (ENG, THA, etc) and feed them into the API when retrieving content. For GET requests it would be part of the query parameter set, no need for specific headers.

On the front end we have a single admin area where you can manage all the language variants and this gets stored on the DB.

This includes translations for non dynamic content such as menu header text etc. which you can easily cache once set.

Advantage is that your app doesn't really care about language, it's just displaying text