Installation
To install Tolgee run:
- npm
- yarn
npm install @tolgee/core
yarn add @tolgee/core
To install UI bundle for in-context translating you will also need to install package @tolgee/ui
.
- npm
- yarn
npm install @tolgee/ui
yarn add @tolgee/ui
After installing packages you can use it like this:
info
Inicialization has changed in version 3
import {Tolgee, IcuFormatter} from "@tolgee/core";
import {UI} from "@tolgee/ui";
const tg = Tolgee.use(IcuFormatter).init({
apiKey: "your_api_key",
apiUrl: "https://app.tolgee.io",
ui: UI
})
tg.run();
Then you can use Tolgee instance the same way as described in translating imperatively.