Skip to main content
Version: 5.x.x

Tools

As DevTools are automatically omitted on production, @tolgee/web/tools can be used to include it unconditionally.

info

Tools were moved from @tolgee/web in version 5.2.0.

InContextTools

Similar to DevTools. Use InContextTools only if you know what you are doing.

It's a combination ObserverPlugin, ContextUi and DevBackend in one plugin, which you can use when you want to enable in-context capability anywhere. It only applies plugins if there they are not already applied. You can optionally provide credentials to Tolgee platform, which will override anything that was set before.

This plugin is automatically downloaded and applied by BrowserExtensionPlugin when you enable in-context translating.

import { InContextTools } from '@tolgee/web/tools'

tolgee.use(InContextTools(props?: InContextOptions));
type InContextOptions = {
credentials: {
apiUrl?: string;
apiKey?: string;
projectId?: string | number;
};
};

Can be applied even when Tolgee is already running.

ContextUi

Tolgee in-context modal, which allows you to edit translation in-context.

import { ContextUi } from '@tolgee/web/tools'

tolgee.use(ContextUi());