JSPM

@tolgee/core

1.0.0-alpha.54
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 57765
  • Score
    100M100P100Q151935F
  • License ISC

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

Package Exports

  • @tolgee/core

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@tolgee/core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.