Drop-in localization
Drop-in localization
Learn how to rename and localize UI labels in Monite’s Drop-in library.
Drop-in localization
Learn how to rename and localize UI labels in Monite’s Drop-in library.
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:
code property.code property.To customize the Drop-in library, you must define your localization object as shown:
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:
msgid strings. The keys match the exact text labels that you see in the UI.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:
To successfully update properties, the localization object that contains your custom localization must be JSON-compliant.