For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • Monite SDK
    • Overview
  • Drop-in
    • Drop-in overview
    • Drop-in theming
    • Drop-in localization
    • Iframe App
  • React SDK
    • Overview
    • SDK customization
    • SDK localization
    • SDK theming
    • SDK releases
    • v4 migration guide
LogoLogo
API StatusPartner Portal
On this page
  • Overview
  • Localization mechanism
Drop-in

Drop-in localization

Learn how to rename and localize UI labels in Monite’s Drop-in library.

Was this page helpful?
Previous

Monite Iframe App

Learn how to configure and customize the Monite Iframe App component to embed Monite's functionality seamlessly into your application.
Next
Built with

Overview

Monite’s Drop-in library supports a localization mechanism. The library defaults to the browser’s locale for handling localization within UI components. However, you can explicitly define localization using the code property on the locale object.

Use Monite’s custom localization mechanism for any of purposes:

  • To define currency formatting and usage of delimiters and decimal separators using the code property.
  • To define date formats by country or region using the code property.
  • To customize any text labels in the widgets (for example, rename “Counterpart Name” to “Supplier Name”).
  • To translate the labels into one or more other languages.

Localization mechanism

To customize the Drop-in library, you must define your localization object as shown:

1const dropinConfig = {
2 entityId: 'ENTITY_ID',
3 apiUrl: 'ENVIRONMENT_URL',
4 locale: {
5 code: 'en-US',
6 messages: {
7 Sales: 'Invoicing',
8 Counterparts: 'Customers',
9 },
10 },
11 fetchToken: async function fetchToken() {...},
12};
13
14const dropin = new MoniteDropin(dropinConfig);
15
16dropin.create(component).mount(...);

The code prop on the locale object is an optional property that handles the usage of delimiters and decimal separators for different currency regions. It also handles the date formatting across various UI components. The accepted format for the code property must adhere to the BCP-47 language tag standard.

The messages prop is an object used to define text translations and customizations. In the messages object:

  • The keys represent the text labels in the Drop-in library’s UI that you wish to replace. You can find all available keys on Monite’s Portable Object template—look for the msgid strings. The keys match the exact text labels that you see in the UI.
  • The values are the new text to use in place of the object’s keys. Values can be of any language, and you can customize these values as required.

Any other labels not specified in the messages object will keep their original text. The following snippets shows how to handle translations and customizations on the messages object:

1{
2 "Counterparts": "Suppliers",
3 "Counterpart Name": "Supplier Name",
4 "Sales": "销售量",
5 "Invoices": "Rechnungen",
6 "Create New": "Создавать новое"
7}

To successfully update properties, the localization object that contains your custom localization must be JSON-compliant.