Questions tagged [next-i18next]

No instructions have been provided for utilizing this tag at the moment.

The serverSideTranslations function in Next-i18next requires the initial locale argument to be passed in for proper

Everything seems to be working fine on my local environment. However, once I deploy it on Firebase, it causes a 500 internal error on nextServer. next-i18next version 8.1.3 Configuration module.exports = { i18n: { defaultLocale: 'en', locales: [ ...

Changing the NextJS route triggers a re-render of the _app.js file due to the usage of next-i18next serverSide

export async function getServerSideProps({ locale }) { const data = await serverSideTranslations(locale, ['apple', 'home']); return { props: data, }; } export default function IndexPage() { return <h1>Hi!</h1> } I have n ...

I'm curious as to why my t() texts are not updating in localhost/en after using i18n.changeLanguage(), but are refreshing correctly in localhost/fr

Hello There I recently created a website with dark mode and multi-language support for testing purposes, but I encountered an issue along the way. The Problematic Code I have removed any unnecessary elements from the code snippet below: portfolio/src/pag ...

Encountered an i18n NextJS error: The FS Module is not found and cannot resolve 'fs' within a specific component

Hello everyone, this is my first time asking a question here so please bear with me if I make any mistakes in formatting or anything else. I'm here to learn. I have a query regarding running code from index.js for translation purposes: import React from 'r ...

Testing next-i18next localization with useTranslation in Jest

Exploring testing libraries is always an interesting adventure. In my NextJS project, I'm utilizing next-i18next. We're incorporating the useTranslation hook with namespaces. During testing, a warning pops up: console.warn react-i18next:: You will need ...

AWS Amplify is failing to display i18n translations on dynamic pages within Next.js (directory structure)

Currently experimenting with the next-i18next package within a Nextjs project. Encountering an issue specifically on dynamic pages like: /blogs/[id], where i18n seems to struggle to translate the content properly, displaying keys rather than actual transla ...

Learn how to handle internationalization routing in Next.js by utilizing a slash instead of a dash

I manage a website with multiple countries, each country having more than one locale. Below is the configuration from my next-i18next.config.js: module.exports = { i18n: { defaultLocale: 'en-eg', locales: ['en-br', 'en-eg', 'en-ke', 'pt-br', 'pt- ...

correct usage of getServerSideProps with Typescript in a next.js project using i18n

I'm encountering challenges with integrating next-i18next into a Typescript NextJS project. There are very few recent examples available for reference. I have successfully set up internationalized routing, but I am facing difficulties in configuring i ...

Learn how to implement locale-based routing for a particular page in your Next.js application when utilizing the next-i18next

In my Next.js project, I have 4 pages - index, service, contact-us, and disclaimer. I have successfully implemented the next-i18next translation system for the index and service pages only. However, I am encountering an issue with the locale routing for th ...

Switching locales in NextJS with dynamic routing

The locale change functionality is working smoothly in my next.js application, except for dynamic routes. When transitioning from http://localhost:3000/client/home/profile to http://localhost:3000/de/client/home/profile in the browser address bar, I encoun ...

nextjs dynamic routing is not compatible with the next-i18next framework

After integrating next-i18next into my Next.js project using the official guide, everything appeared to be functioning correctly. However, I encountered a 404 error when switching from the default language (Italian) to English and navigating to the detail ...

Enable next-i18next to handle internationalization, export all pages with next export, and ensure that 404 error pages are displayed on non-generated pages

After carefully following the guidelines provided by i18next/next-i18next for setting up i18n and then referring to the steps outlined in this blog post on locize on how to export static sites using next export, I have managed to successfully generate loca ...

Retrieve next-i18next translations beyond the current page or component

Currently working on a project using Next.JS and Typescript, I am looking to incorporate next-i18next translations outside of the page/component. The goal is to localize validation messages within a separate utility class that defines the validation engi ...