javascriptnext.jsinternationalizationreact-i18nextnext-i18next

Internationalisation in NextJS


I am trying to put together a NextJS project that needs i18n. I found multiple libraries regarding i18n. Do we really need to those ? Though I went through documentations, maintaining an Object at global level and retrieving it based on locale info from NextJS using some kind of logic feel easier. Is there any specific use-case these libraries are trying to solve ? Am I missing something.

Thanks


Solution

  • You are correct! You can totally simply create a global object and retrieve based on the locale

    I personally use next-translate simply because of:

    But if you don't have many translations and they don't need complex use cases go with the global object and you will be fine, its totally okay