Dynamic Yield supports multilingual sites by allowing you to:
- Fire events in various currencies on the same site
- Localize variations based on language/country
- Localize recommended products based on language/country
Currency Support in Events
If your visitors can purchase using more than one currency - you should add a currency property to your events (purchase, add to cart, or any event with monetary value). Dynamic Yield will convert the amount to the currency that is used in your Dynamic Yield reports.
DY.API("event", {
name: "Purchase",
properties: {
uniqueTransactionId: "123456",
dyType: "purchase-v1",
value: 90.55,
currency: "EUR",
cart: [
productId: "item-34454",
quantity: 1,
itemPrice: 65.87,
size: "XL" // Size is *optional and a customer-specific string*
}
]
}
});
Supported Currencies
Dynamic Yield currently supports the following currencies. If you require a currency that is not on this list, speak to your Customer Success Manager.
Currency | Code |
---|---|
US Dollar | USD($) |
Euro | EUR(€) |
Pound Sterling | GBP(£) |
Yen | JPY(¥) |
New Israeli Sheqel | ILS(₪) |
Argentine Peso | ARS($) |
UAE Dirham | AED(AED) |
Australian Dollar | AUD($) |
Convertible Mark | BAM(KM) |
Bulgarian Lev | BGN(лв) |
Brunei Dollar | BND($) |
Brazilian Real | BRL(R$) |
Belarusian Ruble | BYR(BYR) |
Canadian Dollar | CAD($) |
Swiss Franc | CHF(CHF) |
Chilean Peso | CLP($) |
Yuan Renminbi | CNY(¥) |
Czech Koruna | CZK(Kč) |
Danish Krone | DKK(kr) |
Egyptian Pound | EGP(E£) |
Lari | GEL(ლ) |
Hong Kong Dollar | HKD(HK$) |
Kuna | HRK(kn) |
Forint | HUF(Ft) |
Rupiah | IDR(Rp) |
Indian Rupee | INR(₹) |
Iceland Krona | ISK(kr) |
Jordanian Dinar | JOD(JD) |
Won | KRW(₩) |
Kuwaiti Dinar | KWD(ك) |
Tenge | KZT(KZT) |
Sri Lankan rupee | LKR(Rs) |
Malaysian Ringgit | MYR(RM) |
Norwegian Krone | NOK(kr) |
New Zealand Dollar | NZD($) |
Nuevo Sol | PEN(S/.) |
Philippine Peso | PHP(₱) |
Pakistan Rupee | PKR(Rp) |
Romanian Leu | RON(lei) |
Serbian Dinar | RSD(РСД) |
Russian Ruble | RUB(руб) |
Saudi Riyal | SAR(SR) |
Swedish Krona | SEK(kr) |
Singapore Dollar | SGD($) |
Baht | THB(฿) |
Turkish Lira | TRKas TRY |
New Taiwan Dollar | TWD(NT$) |
Hryvnia | UAH(₴) |
Peso Uruguayo | UYU($U) |
Dong | VND(₫) |
Rand | ZAR(R) |
Colombian Peso | COP($) |
Zloty | PLN(zł) |
Bahraini Dinar | BHD(.د.ب) |
Rial Omani | OMR(ر.ع.) |
Qatari Rial |
QAR(QR) |
Kwanza | AOA (Kz) |
Mexican Peso | MXN ($) |
Mozambique Metical | MZN (MT) |
Note: The exchange rate uses the external service OAnda, and updates once per day at 4 am (GMT). If you require a real-time conversion, you will need to do the conversion on your end, and fire events using the site's default currency.
Localizing Content
You can serve different content to users depending on the language of each page. This is currently only available for site personalization campaigns that are not based on a variation feed.
Defining Each Page Language on Your Site
If your site supports multiple languages (or versions of the same language in multiple countries), add a locale parameter to the page context of every page on your site. For example:
DY.recommendationContext = {type: 'HOMEPAGE', lng: 'en_GB'};
Note: For localizing the campaign's content you will need to make sure your context is updated with the supported language code below. If you already have non-standard codes on your site and in your feed they will need to be updated accordingly.
Language - Country | Language Code |
---|---|
Albanian - Albania | sq_AL |
Arabic - Algeria | ar_DZ |
Arabic - Bahrain | ar_BH |
Arabic - Egypt | ar_EG |
Arabic - Iraq | ar_IQ |
Arabic - Jordan | ar_JO |
Arabic - Kuwait | ar_KW |
Arabic - Lebanon | ar_LB |
Arabic - Libya | ar_LY |
Arabic - Morocco | ar_MA |
Arabic - Oman | ar_OM |
Arabic - Qatar | ar_QA |
Arabic - Saudi Arabia | ar_SA |
Arabic - Sudan | ar_SD |
Arabic - Syria | ar_SY |
Arabic - Tunisia | ar_TN |
Arabic - United Arab Emirates | ar_AE |
Arabic - Yemen | ar_YE |
Belarusian - Belarus | be_BY |
Bulgarian - Bulgaria | bg_BG |
Catalan - Spain | ca_ES |
Chinese - China | zh_CN |
Chinese - Hong Kong | zh_HK |
Chinese - Singapore | zh_SG |
Chinese - Taiwan | zh_TW |
Croatian - Croatia | hr_HR |
Czech - Czech Republic | cs_CZ |
Danish - Denmark | da_DK |
Dutch - Belgium | nl_BE |
Dutch - Netherlands | nl_NL |
English - Australia | en_AU |
English - Canada | en_CA |
English - India | en_IN |
English - Ireland | en_IE |
English - Malta | en_MT |
English - New Zealand | en_NZ |
English - Philippines | en_PH |
English - Singapore | en_SG |
English - South Africa | en_ZA |
English - United Kingdom | en_GB |
English - United States | en_US |
Estonian - Estonia | et_EE |
Finnish - Finland | fi_FI |
French - Belgium | fr_BE |
French - Canada | fr_CA |
French - France | fr_FR |
French - Luxembourg | fr_LU |
French - Switzerland | fr_CH |
German - Austria | de_AT |
German - Germany | de_DE |
German - Luxembourg | de_LU |
German - Switzerland | de_CH |
Greek - Cyprus | el_CY |
Greek - Greece | el_GR |
Hebrew - Israel | iw_IL |
Hindi - India | hi_IN |
Hungarian - Hungary | hu_HU |
Icelandic - Iceland | is_IS |
Indonesian - Indonesia | in_ID |
Irish - Ireland | ga_IE |
Italian - Italy | it_IT |
Italian - Switzerland | it_CH |
Japanese - Japan | ja_JP |
Japanese - Japan,JP | ja_JP_JP |
Korean - South Korea | ko_KR |
Latvian - Latvia | lv_LV |
Lithuanian - Lithuania | lt_LT |
Macedonian - Macedonia | mk_MK |
Malay - Malaysia | ms_MY |
Maltese - Malta | mt_MT |
Norwegian - Norway | no_NO |
Norwegian - Norway,Nynorsk | no_NO_NY |
Polish - Poland | pl_PL |
Portuguese - Brazil | pt_BR |
Portuguese - Portugal | pt_PT |
Romanian - Romania | ro_RO |
Russian - Russia | ru_RU |
Serbian - Bosnia and Herzegovina | sr_BA |
Serbian - Montenegro | sr_ME |
Serbian - Serbia and Montenegro | sr_CS |
Serbian - Serbia | sr_RS |
Slovak - Slovakia | sk_SK |
Slovenian - Slovenia | sl_SI |
Spanish - Argentina | es_AR |
Spanish - Bolivia | es_BO |
Spanish - Chile | es_CL |
Spanish - Colombia | es_CO |
Spanish - Costa Rica | es_CR |
Spanish - Dominican Republic | es_DO |
Spanish - Ecuador | es_EC |
Spanish - El Salvador | es_SV |
Spanish - Guatemala | es_GT |
Spanish - Honduras | es_HN |
Spanish - Mexico | es_MX |
Spanish - Nicaragua | es_NI |
Spanish - Panama | es_PA |
Spanish - Paraguay | es_PY |
Spanish - Peru | es_PE |
Spanish - Puerto Rico | es_PR |
Spanish - Spain | es_ES |
Spanish - United States | es_US |
Spanish - Uruguay | es_UY |
Spanish - Venezuela | es_VE |
Swedish - Sweden | sv_SE |
Thai - Thailand | th_TH |
Thai - Thailand,TH | th_TH_TH |
Turkish - Turkey | tr_TR |
Ukrainian - Ukraine | uk_UA |
Vietnamese - Vietnam | vi_VN |
Localizing Site Personalization Variations
To serve a localized version of variations to your site visitors you need to:
- Make sure the page context is properly defined as detailed above
- Define your site languages
- Define localized values for individual variables in each variation
Manage your Site Languages
- Go to General Setting › Manage Languages.
- Click Add Languages and select the relevant languages your site supports.
- The order defines how they will be displayed in variations and templates. Drag and drop languages to adjust the order. You can delete languages by clicking the X next to each language.
Localize Variation Content
When creating a new template or variation, you will see different language tabs under the Variable tab. These are the languages you chose in the Manage Languages section.
The first tab contains your default values. To localize variables to a different language:
- Switch to the desired language
- Check the variable you want to localize
- Enter the localized variable value
A variation that is served on a page that has this language in its Page Context will show the localized content for variables that are “checked”, and the default content for all other variables.
If a variable is checked for a given language but left empty, we will render the empty text.
To view how the variation will look on your site, click Preview on Site. The variation will be displayed based on the page context defined for that page.
Localizing Recommended Products
Localized versions of Recommendations are served based on the page context, and the values in your product feed.
To add localized values of any product property (e.g. price, name, description), add a column to your Product Feed with the following format
“lng:<language code>:<column name>”: “<value>”.
For example, if your default language is English and you would like to add a French version of the product name, add a column called "lng:fr_FR:name", and set the French value for it as seen below.
"name":"White Pants"
"lng:fr_FR:name":"Pantalon Blanc"
For translations of attributes that have multiple values (e.g. parent and child categories), the order of the values should match the language order. For LTR languages, the values should be LTR, and for RTL languages the values should be RTL.