DEV Community

Discussion on: Step-by-step: How to Internationalize your NextJS App with Next-Translate

gaelgthomas profile image
Gaël Thomas Author

Thanks, @maciejtatol!

Great suggestion! That's a mistake, and I just corrected it.

Here is further information about the folder structure: most libraries are configured this way to create one folder per language. When your website loads, it uses the corresponding folder for your selected locale.

It's a better project architecture; you can create many files (namespaces) for each locale. As an example, most of the time, you will have one namespace per page:

  • locales/fr/common.js (common translations)
  • locales/fr/home.js (home page translations)
  • locales/fr/contact.js (contact page translations) and so on!