Skip to main content

Multi-Language Templates

Unlayer’s Multi-Language Templates (MLT) feature allows users to design and manage multilingual content within a single template. It’s ideal for applications that target global audiences and require efficient content localization.

Khizar Tanveer avatar
Written by Khizar Tanveer
Updated over 3 months ago

Key Capabilities

  • Define and manage multiple languages (e.g., English, Spanish, Portuguese, Urdu).

  • Enable a language switcher in the editor.

  • Provide per-language input for supported tools (Text, Image, Menu, Timer, etc.).

  • Export content for each language individually.

Configuration

1. Enable Multi-Language in unlayer.init()

unlayer.init({
features: {
multiLanguage: {
enabled: true,
languages: [
{ label: 'Portuguese', value: 'pt_BR', default: true },
{ label: 'English', value: 'en_US' },
{ label: 'Urdu', value: 'ur', rtl: true }
]
}
}
});

2. Set Languages Dynamically with unlayer.setLanguages()

unlayer.setLanguages([
{ label: 'Portuguese', value: 'pt_BR', default: true },
{ label: 'English', value: 'en_US' },
{ label: 'Urdu', value: 'ur', rtl: true }
]);

3. Switch Active Language for Export with unlayer.setCurrentLanguage()

unlayer.setCurrentLanguage('en_US');

Behavior and Output

  • The builder interface will display a dropdown to switch between languages.

  • Content does not auto-translate — users must manually input content for each language.

  • When exporting (HTML, PDF, etc.), only the content of the currently selected language is included.

  • You should export each language version individually for delivery based on audience preferences.

Did this answer your question?