Localization
Configure the editor interface language for your users
The editor interface supports 19 languages. The interface language is determined by userInfo.language returned from your getWidgetData API implementation.
Setting the Editor Language
The editor language is controlled through the userInfo.language property in your getWidgetData API response:
const api = {
getWidgetData: () => Promise.resolve({
// ... other data
userInfo: { language: 'de' }, // German interface
}),
};
window['ClaspoEditor'].init({
// ... other config
api,
});Supported Languages
| Code | Language |
|---|---|
| ar | Arabic |
| bg | Bulgarian |
| cs | Czech |
| da | Danish |
| de | German |
| el | Greek |
| en | English |
| es | Spanish |
| fr | French |
| it | Italian |
| nl | Dutch |
| pl | Polish |
| pt | Portuguese |
| ro | Romanian |
| ru | Russian |
| sv | Swedish |
| tr | Turkish |
| uk | Ukrainian |
| zh | Chinese |
Default Behavior
When userInfo.language is not specified, the editor defaults to English (en).
Custom Translation Overrides
Override specific translation keys using localePatch:
window['ClaspoEditor'].init({
// ... other config
defaultLanguage: 'en',
localePatch: {
'WIDGET_TYPE_FLOATING_BOX': {
'en': 'Floating Box',
'de': 'Schwebendes Fenster',
'fr': 'Boîte flottante'
}
}
});The defaultLanguage property serves as a fallback for localePatch when a translation for the user's language is missing. It does not control the editor UI language.
Translation Coverage
Not all languages have complete translations. Missing keys fall back to English.
If you need additional translations for your language, contact our support team. We prioritize translation requests based on demand.
Updated 1 day ago
