-
For someone in futute: Here is answerFirst: Make sure you are import the right package Second: I18n select not working in dev mode, Here is original post:Use showcase as standard implements, When I try to wrote my own i18n site, Something went wrong: Question1: How to single index? Select locale from dropdown will redirect to suffix Question1: In showcases website, There is only one index ( No Question2: I also tried create sub directory and copy index.tsx, But ff I select again and again will cause URL become
Question3: Translate component not working Continue with Question2, I create export default function Home(): React.JSX.Element {
return (<Translate id='homepage.welcome'/>)
} Use {
"homepage.welcome": {
"message": "Welcome to foo bar"
}
} Question3: Why my BTW: I think its pretty static, According to the Question 4: What is the best practice ? I need:
AFAIK, Multi sub folder equivalent to access different website, I don't think that's real i18n. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You are not supposed to have I can't help more if you don't share a repro sorry. Show me actual code I can run, what you want, and what you see, and I'll tell you how to fix your code. |
Beta Was this translation helpful? Give feedback.
import Translate from "@docusaurus/core/lib/client/exports/Translate";
You are not supposed to import from that path. It will be forbidden in the future. Probably the problem.
For me to help, it's better to share a runnable repro, not just code samples