Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More

@tolgee/core

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tolgee/core

Library providing ability to translate messages directly in context of developed application.


Version published
Maintainers
1
Created

Tolgee core library

Tolgee Toolkit

Core library of Tolgee localization toolkit. For more information about Tolgee Toolkit, visit our documentation website toolkit.tolgee.io.

Installation

npm install @tolgee/core --save

Usage

First, create a Tolgee instance and run it.

import {Tolgee} from "@tolgee/core";

const tg = new Tolgee({
    apiKey: "your_api_key",
    apiUrl: "https://app.tolgee.io",
})

tg.run();

Then, use it to translate your strings.

tg.onLangLoaded.subscribe(() => {
    document.title = tg.translate("hello_world");
});

To learn more, check Hello World example.

FAQs

Package last updated on 13 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts