Language Support #7975
Replies: 3 comments 3 replies
-
I'm using i18next-resources-to-backend + webpack For this error says
There will be another problems
|
Beta Was this translation helpful? Give feedback.
-
backend: {
- loadPath: 'http://localhost:3000/api/locales/{{lng}}/{{ns}}.json', // Adjust this path based on your project structure
+ loadPath: '/api/locales/{{lng}}/{{ns}}.json', // Adjust this path based on your project structure
}, this host and port may not work in production(docker) env |
Beta Was this translation helpful? Give feedback.
-
So, may I ask about, i18n is added up to main branch?or is it in consideration |
Beta Was this translation helpful? Give feedback.
-
Hey, I was trying to work on #374
We can easily install i18n in the cvat-ui and configure the components to get the translation file via hooks and props. We have 2 option, either keep the translation file in the frontend or we can make a api call to get the translation file.
Making a api call is preferred as loading all the translation might make the front-end heavy and will take time to load.
I have tried making a endpoint at 'localhost:7000/locales/{lng}/translation.json' and I am able to get the data at this endpoint but for some reasons I am not able to get this at 'localhost:3000/locales/{lng}/translation.json'. I thought it might work just like 'localhost:3000/api/...' . Also I am not able to call 'localhost:7000/locales/{lng}/translation.json' directly from the cvat-ui.
Can you suggest me how to fix this.
And if you have any other alternatives please let me know.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions