rising-crimson
rising-crimson6mo ago

antd login page translations

Hi guys, I'm trying to figure out how to translate this error message, everything else is translated correctly. Note that the "please enter" text is still in english.
No description
3 Replies
kapa.ai
kapa.ai6mo ago
Hi @eruecco87. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Refine supports internationalization (i18n) and allows you to create your own translation files to override the default texts. This includes the text for the login page and error messages. Here is an example of how you can override the default texts:
{
"pages": {
"login": {
"title": "Sign in to your account",
"signin": "Sign in",
"signup": "Sign up",
"divider": "or",
"fields": {
"email": "Email",
"password": "Password"
},
"errors": {
"validEmail": "Invalid email address"
},
"buttons": {
"submit": "Login",
"forgotPassword": "Forgot password?",
"noAccount": "Don’t have an account?",
"rememberMe": "Remember me"
}
}
}
}
{
"pages": {
"login": {
"title": "Sign in to your account",
"signin": "Sign in",
"signup": "Sign up",
"divider": "or",
"fields": {
"email": "Email",
"password": "Password"
},
"errors": {
"validEmail": "Invalid email address"
},
"buttons": {
"submit": "Login",
"forgotPassword": "Forgot password?",
"noAccount": "Don’t have an account?",
"rememberMe": "Remember me"
}
}
}
}
You can replace the English text with the translations in your desired language. For example, if you want to translate the "please enter" text, you can add a new key-value pair in the "errors" object like this:
"errors": {
"validEmail": "Invalid email address",
"pleaseEnter": "Your translation here"
}
"errors": {
"validEmail": "Invalid email address",
"pleaseEnter": "Your translation here"
}
Please refer to the Refine documentation on i18n Provider (https://refine.dev/docs/i18n/i18n-provider#translation-file) for more details. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai6mo ago
<@210833696469680129> kapa.ai is still learning and improving, please let us know how it did by reacting below
rising-crimson
rising-crimson6mo ago
The bot's suggestion ain't it