I've been looking for a solution or a 'best practices' of some sort to display content in multiple languages, while also displaying different content based on the country/region the user is in or selects. This is often requested by our marketing team.
An example of this would be: Show different French copy/content in France than in Switzerland.
My current approach is to embed these in the route like this: [domain]/[country]/[language]/[content route]
Current tech stack is a create react app for a simple application, which will most likely expand in the future. So it's a bit of future proofing. I have been looking into linguijs (with i18next under the hood), which seems to be a good option for doing localization (in react). It also lets you add locales, but only using the BCP-47 code. In other words: I don't think you can specify locales per region, which is a problem for me.
Anyways, I may be approaching this the wrong way. Any tips or general guidance would be more than welcome. Both from an architectural and practical standpoint.
Aucun commentaire:
Enregistrer un commentaire