Migrating i18next project

Migrating an existing backend from i18next is just changing a few lines of code.

code Browser

Just use the i18next-locize-backend

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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.)

Find more details and configuration options on the github page.

code node.js

Just use the i18next-node-locize-backend

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import i18next from 'i18next';
import Backend from 'i18next-node-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.)

Find more details and configuration options on the github page.

content_copy Migrating your data

You can use our commandline tool to copy your existing translations over to your locize project.


Have questions? Contact us!

Share