Skip to main content
Node.js

Localizing with Node's built-in i18n support.

Nick Ustinov avatar
Written by Nick Ustinov
Updated over 8 months ago

You might also be interested in checking out our Node API SDK.

A sample app built with Node.js and React can be found on Developer Hub.

Lokalise can be used with Node.js apps.

Prerequisites

Uploading to Lokalise

Upload your translation files to Lokalise:

$ lokalise2 \
 --token <token> \
 --project-id <project_id> \
 file upload \
 --file "myapp/locales/en.json" \
 --lang-iso en

Additional upload options can be found in the CLI docs.

Downloading from Lokalise

As the translators are done you need to download the language files from Lokalise:

$ lokalise2 \
 --token <token> \
 --project-id <project_id> \
 file download \
 --format json \
 --original-filenames=false \
 --bundle-structure "%LANG_ISO%.json" \
 --unzip-to "myapp/locales/"

Additional download options can be found in the CLI docs.

Did this answer your question?