Skip to content

Locale Switcher plugin

The locale-switcher plugin provides a popover that allows to switch to other locale. The user interface then is updated instantly based on the selected locale.

Install

> npm install '@sse-ui/pdf-locale-switcher';

OR

> yarn add '@sse-ui/pdf-locale-switcher';

Usage

1. Import the plugin

javascript
import { localeSwitcherPlugin } from "@sse-ui/pdf-locale-switcher";

2. Create the plugin instance

javascript
const localeSwitcherPluginInstance = localeSwitcherPlugin();

The plugin instance localeSwitcherPluginInstance provides the following property:

PROPERTYTYPEDESCRIPTIONFROM
LocalePopoverReactElementThe default popover lists available locales1.0.0

3. Register the plugin

Register the locale-switcher plugin instance:

javascript
<Viewer plugins={[localeSwitcherPluginInstance]} />

Properties

The locale-switcher plugin provides other useful property as following:

javascript
import { LocaleIcon } from "@sse-ui/pdf-locale-switcher";
PROPERTYTYPEDESCRIPTIONFROM
LocaleIconReactElementThe icon used in the LocalePopover component1.0.0

See also

Released under the MIT License.