1.0.15 • Published 8 months ago

localisr v1.0.15

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

npm version install size npm downloads

Installing

Using npm:

$ npm install localisr

Using yarn:

$ yarn add localisr

Once the package is installed, you can import the library using import or require approach:

import {LocalisrClient} from 'localisr'

or

const {LocalisrClient} = require('localisr')

Example

This shows the method for getting translations of all the keys within a group.

import {LocalisrClient} from 'localisr'

// initialize Localisr client
const localisr = new LocalisrClient(
    <LOCALISR_ACCESS_TOKEN>, 
    <LOCALISR_PROJECT_KEY>
);

// get translations for all the keys in 'user-login' group
const translations = await localisr
    .setLanguage(<language>)
    .groups()
    .getTranslations(<group-name>)
    .catch((error) => {
        console.log(error.response)
    });

Get all added documents

// initialize Localisr client
const localisr = new LocalisrClient(
    <LOCALISR_ACCESS_TOKEN>, 
    <LOCALISR_PROJECT_KEY>
);

// get translations for all the keys in 'user-login' group
const documents = await localisr
    .documents()
    .getAll()
    .catch((error) => {
        console.log(error.response)
    });
1.0.15

8 months ago

1.0.14

8 months ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago