Campaign Localization
One campaign can show in several languages. For example, run the same announcement in Danish and English: you design it once, then translate it for each language.
Pre-requisites
Section titled “Pre-requisites”Set up your languages under Languages in the website settings. Without them, the Language dropdown does not show.
Localizing Content
Section titled “Localizing Content”In this example, the website has three languages: en, dk and en-dk.
-
On the campaign’s Design tab, pick the language in the Language dropdown at the top of the preview.
-
Select the component in the left panel. In the right panel, click the Localize button at the end of the field (in a text editor, it is the last button of the toolbar). Then enter the translation, for example the Danish headline.
Every field that can differ per language has this button at the end of its row. It shows only when a language other than the default is picked in Language:
- Outlined: the field uses the default value, or the value of its parent language, and is locked. Click the button to give this language its own value.
- Filled purple: this language has its own value. The field starts from a copy of the value it was showing, ready to translate, so nothing goes missing. Click the button again to drop it and go back to the default value.
Hover over the button to see which of the two it is, and for which language.
-
Publish the campaign. Visitors on the Danish pages, for example
https://demo.fluentos.com/da-dk, see the Danish version.
Localizable Properties
Section titled “Localizable Properties”Click Localize on any of these to give a language its own value:
- Text: the wording and its formatting.
- Images: another image per language.
- Step dimensions: the width and height of the step. Some languages, such as French or Dutch, need more room than English.
- Input Text: the placeholder text of input fields.
- Input Validation Message: the message shown when a field is not filled in correctly. It is shown when a required field is left empty, or when the value is not valid (such as an email, date, number or URL). If you leave it empty, a date field shows its entry format instead and an email field shows an example address. Other field types only get a red outline when the message is empty.
- Button Label Text: the text on the button.
- Button URL: the link the button opens.
- Widgets:
- Spin the Wheel: the texts and image on each slice, each slice’s Result Headline and Result Description, and some sizes of the wheel.
- Scratch Card and Pick a Box: the images, and each prize’s Result Headline and Result Description.
- Countdown: the labels for days, hours, minutes and seconds.
- Video: the video link, for example a version with subtitles per language.
Input fields also have a Label Style setting, which decides how the placeholder text shows. It is set once per field and uses the translated placeholder in every language.
- None (default): the placeholder sits inside the field and disappears as soon as the visitor starts typing.
- Tag: when the visitor clicks into the field, the placeholder moves up onto the field’s top border as a small tag and stays there, so visitors can still see what the field is for after filling it in.
- Inside: the placeholder moves to the top of the field in a smaller size and stays there while the visitor types.
Examples
Section titled “Examples”The same campaign in the default language (English) and in French: the English text takes two lines, the French one three, so the French version uses a text size of 28 px instead of 34 px.
Placeholders for the visitor’s language and country
Section titled “Placeholders for the visitor’s language and country”Instead of writing one link or text per language, you can let the visitor’s browser fill in the language or the country:
| Placeholder | Becomes | Example |
|---|---|---|
{{locale}} |
the language code of the market the page matches, such as da or en-gb; default when the page matches none of your markets |
https://shop.com/{{locale}}/sale |
{{locale:en}} |
the same, but en instead of default when the page matches none of your markets; use this in texts and links so visitors never see default |
https://shop.com/{{locale:en}}/sale |
{{country}} |
the visitor’s country as a two-letter code, such as DK; empty when it is not known |
https://shop.com/sale?country={{country}} |
{{country:DK}} |
the visitor’s country, or DK when it is not known (for example behind a privacy network), so a link never ends up with an empty part |
https://shop.com/{{country:DK}}/sale |
{{dataHub:KEY}} |
a value your website pushed to the DataHub | Hi {{dataHub:firstName}} |
They work in Text components (also inside links in the text), Button text and Link URL, the labels of checkboxes and choices, and pre-filled field values. The custom scripts of buttons and campaign callbacks understand them too. The texts inside games and countdowns (Spin the Wheel, Scratch Card, Pick a Box, Countdown) do not: there the braces are shown as written. Write them exactly as shown, without spaces inside the braces.
In the builder preview, {{locale}} and {{locale:en}} show the language you are editing; in the default language {{locale:en}} shows its fallback, en, and {{locale}} stays as written. {{country:DK}} shows its fallback, DK. {{country}} without a fallback stays as written, because the builder cannot know where a visitor will be.