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
Core library of Tolgee localization toolkit. For more information about Tolgee Toolkit, visit our documentation website toolkit.tolgee.io.
Installation
npm install @tolgee/core --saveUsage
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.