Lokalise APIv2 Node SDK

Node interface for the Lokalise APIv2.

View the Project on GitHub lokalise/node-lokalise-api




Languages

Language attributes

Fetch system languages

API doc

const languages = await lokaliseApi.languages().system_languages({
  page: 3,
  limit: 2,
});

languages.items[0].lang_id;

Fetch project languages

API doc

const languages = await lokaliseApi.languages().list({
  project_id: project_id,
  page: 2,
  limit: 4,
});

languages.items[0].lang_id;

Fetch a single project language

API doc

const language = await lokaliseApi.languages().get(lang_id, {
  project_id: project_id,
});

language.lang_name;

Create project languages

API doc

const languages = await lokaliseApi.languages().create([
  {
    "lang_iso": "ak"
  }
], { project_id: project_id });

languages.items[0].lang_id;
languages.errors;

Update project language

API doc

const language = await lokaliseApi.languages().update(lang_id, {
  "lang_name": "Chinese Traditional Custom"
}, { project_id: project_id });

language.lang_name;

Delete project language

API doc

const response = await lokaliseApi.languages().delete(lang_id, { project_id: project_id });

response.language_deleted;