DEV Community

Cover image for i18n with NextJS output export

i18n with NextJS output export

Ikram Ul Haq on February 06, 2024

In this post, I'll guide you through the process of setting up internationalization (i18n) in a Next.js project. We'll explore how to integrate i18...
Collapse
 
nilsjacobsen profile image
Nils Jacobsen

Great article 👍 is there a reason you didn't use ParaglideJS?

Collapse
 
ikramdeveloper profile image
Ikram Ul Haq

Nice library but does it support NextJS with output: export?

Collapse
 
ikramdeveloper profile image
Ikram Ul Haq

Going through the library, I found it relatively new and no built in support for NextJS output export. So we are good with next-translate that is minimalist and well maintained but yeah we can give it a try.

Thread Thread
 
lorissigrist profile image
Loris Sigrist

Hi, Paraglide Maintainer here
Paraglide does work with NextJs's output: export set, but I see that you've already made up your mind. next-translate is certainly a good choice & you won't regret choosing it. We're going to keep working on Paraglide & hopefully it's going to be feature-complete enough next time!

Thread Thread
 
ikramdeveloper profile image
Ikram Ul Haq

Certainly! If it proves to be helpful, we'll definitely consider incorporating it into our project. Thank you! 👍

Collapse
 
nardoshood profile image
Nardos Tilahun

Will this work on nextjs 12?

Collapse
 
ikramdeveloper profile image
Ikram Ul Haq

Nardos, not sure about it. We can give it a try

Collapse
 
silvio_junior profile image
Silvio Júnior

@ikramdeveloper Great article. Is it possible to use Trans from next-i18next or any other approach to put custom translated text into the page?

Collapse
 
ikramdeveloper profile image
Ikram Ul Haq

Silvio, I haven’t used next-i18next as described in the article. Instead, with the next-translate package, there’s a useTranslation hook that helps in writing custom translated text.