Migrating an i18next project
Migrating an existing backend from i18next is just changing a few lines of code.
Just use the
i18next-locize-backend
import i18next from 'i18next';
import Backend from 'i18next-locize-backend';
i18next
.use(Backend)
.init({
// ...other options
backend: {
projectId: '[PROJECT_ID]',
apiKey: '[API_KEY]',
referenceLng: '[LNG]'
}
});
(You can find your projectId and API Key in your projects settings under the API Tab.)
locize migrate --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba --path ./public/locales
Last modified 3mo ago