Closed duoluodexiaoxiaoyuan closed 11 months ago
Hi, you have to move every folder inside the [locale]
folder, so about
, contact
, profile
, header.jsx
, layout.js
, loading.js
, and not-found.js
.
https://github.com/duoluodexiaoxiaoyuan/mynextproject/tree/usei18n
thank u, i know.
You're using useCurrentLocale()
in a file (header.jsx
) that isn't inside the [locale]
folder. You should move it from src/app/header.jsx
to src/app/[locale]/header.jsx
You're using
useCurrentLocale()
in a file (header.jsx
) that isn't inside the[locale]
folder. You should move it fromsrc/app/header.jsx
tosrc/app/[locale]/header.jsx
i see this example: https://codesandbox.io/p/sandbox/wizardly-shaw-vzfwfc?file=%2Fapp%2F%5Blocale%5D%2Fclient%2Fpage.tsx%3A1%2C1-20%2C2
That's because header.jsx
isn't a page, so it can be used anywhere. You should move any pages (page.jsx
) into the [locale]
folder.
That's because
header.jsx
isn't a page, so it can be used anywhere. You should move any pages (page.jsx
) into the[locale]
folder.这是因为header.jsx
不是一个页面,所以它可以在任何地方使用。您应该将所有页面(page.jsx
)移动到[locale]
文件夹中。
thank u, i know.
I'm not sure to understand correctly, do you still have an error and need help? Or is it resolved?
I'm not sure to understand correctly, do you still have an error and need help? Or is it resolved?
i restart a typescript project, now it's ok, thank u, occur i start a new knowledge, i need to clean enviroment. otherwise alwayles meet many strange problems
First, thank u author patient reply. if someone want to use quickly i18n, this is my demo with next and next-international,this is https://github.com/duoluodexiaoxiaoyuan/mynextappusets/tree/usei18nrouter.
use a new library and success apply own project need meet some difficult, I hope my experience can help u quickly to learn.
I previous never use i18n. But now i need to learn, because i have requirements now.
i don't sure what relationship about Minimal i18n routing and translations , next-intl, next-international, next-i18n-router.
I think four methods to impl i18n. it's independent.
so i choose next-international.
open source is a happy things, but it's tired. thank u author.
As a beginner, try to create issue is a great start. A good project need more particular.
Describe the bug
this is my repo: https://github.com/duoluodexiaoxiaoyuan/mynextproject/tree/usei18n
i don't sure is my problem about use js or put file location error.
Expected behavior A clear and concise description of what you expected to happen.
About (please complete the following information):