-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
not able to find way to add new key-value pair and how to initialize i18n with value from mongoDB #21
Comments
@Unknown051 @lamualfa @mobaabid please for your comments |
The initializing process should be done in i18next layer. A backend layer like this library can't do it directly. See https://www.i18next.com/how-to/add-or-load-translations for further information.
You can update the locale data directly via i18next. This Backend plugin with update it automatically.
I am not sure I fully understand this question. If you mean to use i18next in the React.js application, you can follow this guide https://react.i18next.com/getting-started. But if you mean the mechanism that i18next use to interact with their backend, the backend will implement some of the abstraction methods that i18next provided before. For further information, you can follow this guide about creating your own plugin https://www.i18next.com/misc/creating-own-plugins#backend. |
Yeah, it's already correct. The collection is still empty because you don't initialize any data using i18next. |
@lamualfa thanks for your comments. Please for your inputs to below cases what we have we have 2 cases to implement
similar to below sample code
we believe this can be implemented with the help of 'i18next-node-mongodb-backend-next' regards, |
You must insert and read the translation data via i18next, not directly into the database. The Backend layer, like this library, doesn't provide any of those features.
Use References |
@lamualfa thanks for quick response sorry for more questions, I am trying to understand how I can use i18next-node-mongodb-backend-next from below point in the readMe I understood this package can be used to load data from mongoDB for i18next initialization. Am I right ? |
Yeah, of course. This library has been officially approved by i18next team. |
@lamualfa I am looking for sample to understand how to do the same can u help me with that ? thanks, |
Try looking these examples https://github.com/lamualfa/i18next-node-mongodb-backend-next/tree/v0.x-examples. |
@lamualfa I am going through the examples will comeback, If I need more info might trouble you again with questions, sorry for that :) Regards, |
Dear Team,
Need help for below points. I am not getting references for below things:
I followed the readMe and initialized the i18next using nodeJS as below, which created a new table in mongoDB:
i18next.use(Backend).init({
// Backend Options
backend: {
host: 'localhost',
port: 27017,
dbName: 'dy-mde', // Required field
},
})_
Regards,
Prem
The text was updated successfully, but these errors were encountered: