Dynamic Yield supports multi-language 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 make purchases using more than one currency, add a currency property to your events (purchase, add to cart, or any event with monetary value). Dynamic Yield converts 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
}
]
}
});
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 Shekel (₪) | ILS |
UAE Dirham (AED) | AED |
Afghan Afghani (؋) | AFN |
Albanian Lek (Lek) | ALL |
Armenian Dram (֏) | AMD |
Netherlands Antillean Guilder (ƒ) | ANG |
Angolan Kwanza (Kz) | AOA |
Argentine Peso ($) | ARS |
Australian Dollar ($) | AUD |
Aruban Florin (ƒ) | AWG |
Azerbaijani Manat (₼) | AZN |
Bosnia-Herzegovina Convertible Mark (KM) | BAM |
Bulgarian Lev (лв) | BGN |
Burundian Franc (FBu) | BIF |
Bermudan Dollar ($) | BMD |
Brunei Dollar ($) | BND |
Bolivian Boliviano ($b) | BOB |
Brazilian Real (R$) | BRL |
Bahamian Dollar ($) | BSD |
Bitcoin (₿) | BTC |
Bhutanese Ngultrum (Nu.) | BTN |
Botswanan Pula (P) | BWP |
Belarusian Ruble (Br) | BYN |
Belarusian Ruble (BYR) | BYR |
Belize Dollar (BZ$) | BZD |
Canadian Dollar ($) | CAD |
Congolese Franc (FC) | CDF |
Swiss Franc (CHF) | CHF |
Chilean Unidad de Fomento (UF) | CLF |
Chilean Peso ($) | CLP |
Chinese Yuan (¥) | CNY |
Colombian Peso ($) | COP |
Costa Rican Colón (₡) | CRC |
Cuban Convertible Peso (CUC$) | CUC |
Cuban Peso (₱) | CUP |
Cape Verdean Escudo ($) | CVE |
Czech Koruna (Kč) | CZK |
Djiboutian Franc (Fdj) |
DJF |
Danish Krone (kr) | DKK |
Dominican Peso (RD$) |
DOP |
Algerian Dinar (دج) |
DZD |
Estonian Kroon (KR) |
EEK |
Egyptian Pound (E£) | EGP |
Eritrean Nakfa (Nkf) |
ERN |
Ethiopian Birr (ብር) |
ETB |
Fijian Dollar ($) |
FJD |
Falkland Islands Pound (£) |
FKP |
Georgian Lari (ლ) | GEL |
Guernsey Pound (£) |
GGP |
Ghanaian Cedi (¢) |
GHS |
Gibraltar Pound (£) |
GIP |
Gambian Dalasi (D) |
GMD |
Guinean Franc (FG) |
GNF |
Guatemalan Quetzal (Q) |
GTQ |
Guyanaese Dollar ($) |
GYD |
Hong Kong Dollar (HK$) | HKD |
Honduran Lempira (L) |
HNL |
Croatian Kuna (kn) | HRK |
Haitian Gourde (G) |
HTG |
Hungarian Forint (Ft) | HUF |
Indonesian Rupiah (Rp) | IDR |
Manx pound (£) |
IMP |
Indian Rupee (₹) | INR |
Iraqi Dinar (د.ع) |
IQD |
Iranian Rial (﷼) |
IRR |
Iceland Krona (kr) | ISK |
Jersey Pound (£) |
JEP |
Jamaican Dollar (J$) |
JMD |
Jordanian Dinar (JD) | JOD |
Kenyan Shilling (KSh) |
KES |
Kyrgystani Som (лв) |
KGS |
Cambodian Riel (៛) |
KHR |
Comorian Franc (CF) |
KMF |
North Korean Won (₩) |
KPW |
South Korean Won (₩) | KRW |
Kuwaiti Dinar | KWD |
Cayman Islands Dollar ($) |
KYD |
Kazakhtani Tenge (ك) | KZT |
Laotian Kip (₭) |
LAK |
Lebanese Pound (£) |
LBP |
Sri Lankan Rupee (Rs) | LKR |
Liberian Dollar ($) |
LRD |
Lesotho Loti (L) |
LSL |
Lithuanian Litas (Lt) |
LTL |
Latvian Lats (LVL) |
LVL |
Libyan Dinar (ل.د) |
LYD |
Moroccan Dirham (DH) |
MAD |
Moldovan Leu (L) |
MDL |
Malagasy Ariary (Ar) |
MGA |
Macedonian Denar (ден) |
MKD |
Myanma Kyat (K) |
MMK |
Mongolian Tugrik (₮) |
MNT |
Macanese Pataca (MOP$) |
MOP |
Mauritanian Ouguiya (MRU) |
MRO |
Mauritian Rupee (₨) |
MUR |
Maldivian Rufiyaa (.ރ) |
MVR |
Malawian Kwacha (MK) |
MWK |
Mexican Peso ($) |
MXN |
Malaysian Ringgit (RM) | MYR |
Mozambican Metical (MT) |
MZN |
Namibian Dollar ($) |
NAD |
Nigerian Naira (₦) |
NGN |
Nicaraguan Córdoba (C$) |
NIO |
Norwegian Krone (kr) | NOK |
Nepalese Rupee (₨) |
NPR |
New Zealand Dollar ($) | NZD |
Omani Rial (ر.ع.) |
OMR |
Panamanian Balboa (B/.) |
PAB |
Nuevo Sol (S/.) | PEN |
Papua New Guinean Kina (K) |
PGK |
Philippine Peso (₱) | PHP |
Pakistan Rupee (Rp) | PKR |
Polish Zloty (zł) |
PLN |
Paraguayan Guarani (Gs) |
PYG |
Qatari Rial (ر.ق) |
QAR |
Romanian Leu (lei) | RON |
Serbian Dinar (РСД) | RSD |
Russian Ruble (руб) | RUB |
Rwandan Franc (FRw) |
RWF |
Saudi Riyal (SR) | SAR |
Solomon Islands Dollar ($) |
SBD |
Seychellois Rupee (₨) |
SCR |
Sudanese Pound (ج.س.) |
SDG |
Swedish Krona (kr) | SEK |
Singapore Dollar ($) | SGD |
Saint Helena Pound (£) |
SHP |
Sierra Leonean Leone (Le) |
SLL |
Somali Shilling (S) |
SOS |
Surinamese Dollar ($) |
SRD |
São Tomé and Príncipe Dobra (Db) |
STD |
Salvadoran Colón ($) |
SVC |
Syrian Pound (£) |
SYP |
Swazi Lilangeni (E) |
SZL |
Thai Baht (฿) | THB |
Tajikistani Somoni (ЅM) |
TJS |
Turkmenistani Manat (T) |
TMT |
Tunisian Dinar (د.ت) |
TND |
Tongan Paʻanga (T$) |
TOP |
Turkish Lira (₺) | TRY |
Trinidad and Tobago Dollar (TT$) |
TTD |
New Taiwan Dollar (NT$) | TWD |
Tanzanian Shilling (TSh) |
TZS |
Hryvnia (₴) | UAH |
Ugandan Shilling (USh) |
UGX |
Peso Uruguayo ($U) | UYU |
Uzbekistan Som (лв) |
UZS |
Venezuelan Bolívar Fuerte (Bs) |
VEF |
Dong (₫) | VND |
Vanuatu Vatu (VT) |
VUV |
Samoan Tala (WS$) |
WST |
CFA Franc BEAC (F.CFA) |
XAF |
Silver (troy ounce) (XAG) |
XAG |
Gold (troy ounce) (AXAU) |
XAU |
East Caribbean Dollar ($) |
XCD |
Special Drawing Rights (SDRs) |
XDR |
CFA Franc BCEAO (F.CFA) |
XOF |
CFP Franc (₣) |
XPF |
Yemeni Rial (﷼) |
YER |
Rand (R) | ZAR |
Zambian Kwacha (pre-2013) (Zk) |
ZMK |
Zambian Kwacha (Zk) |
ZMW |
Zimbabwean Dollar (Z$) |
ZWL |
Note: The exchange rate uses the external service currencylayer and updates once every day at 4 am (UTC). If you require a real-time conversion, you must 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 user's locale. This is currently available only for API, dynamic content emails, and site personalization campaigns that are not based on a variation feed.
Add language context on every page
If your site supports multiple languages (or versions of the same language in multiple countries), add a locale (lng) parameter to the page context of every page on your site. For example:
DY.recommendationContext = {type: 'HOMEPAGE', lng: 'en_GB'};
This lng code enables us to serve the correct language.
Add language context for email
To support multiple languages in Experience Email, see the Configure ESP parameters section in the main Experience Email article.
Supported languages codes
Use this if you want to translate per language, regardless of the country. This requires that the lng attribute start with the language code. This means that "fr-FR" and "fr-CA" are both considered as "fr".
Language | Language Code |
---|---|
Ainu | ain.* |
Afar | aa.* |
Afrikaans | af.* |
Akan | ak |
Albanian | sq.* |
Arabic | ar.* |
Armenian | hy.* |
Azeri | az |
Basque | eu.* |
Belarusian | be.* |
Bulgarian | bg.* |
Catalan | ca.* |
Chinese | zh.* |
Croatian | hr.* |
Czech | cs.* |
Danish | da.* |
Divehi | dv.* |
Dutch | nl.* |
English | en.* |
Estonian | et.* |
Farsi | fa.* |
Faroese | fo.* |
Finnish | fi.* |
French | fr.* |
Galician | gl.* |
Georgian | ga.* |
German | de.* |
Gujarati | gu.* |
Greek | el.* |
Hebrew | he.* |
Hindi | hi.* |
Hungarian | hu.* |
Icelandic | is.* |
Indonesian | in.* |
Irish | gle.* |
Italian | it.* |
Japanese | ja.* |
Kannada | kn.* |
Kazakh | kk.* |
Konkani | kok.* |
Korean | ko.* |
Kyrgyz | ky.* |
Latvian | lv.* |
Lithuanian | lt.* |
Macedonian | mk.* |
Malay | ms.* |
Maltese | mt.* |
Maori | mi.* |
Marathi | mr.* |
Mongolian | mn.* |
Northern Sotho | ns.* |
Norwegian | no.* |
Pashto | ps.* |
Punjabi | pa.* |
Polish | pl.* |
Portuguese | pt.* |
Quechua | qu.* |
Romanian | ro.* |
Russian | ru.* |
Sanskrit | sa.* |
Sami | se.* |
Serbian | sr.* |
Slovak | sk.* |
Slovenian | sl.* |
Spanish | es.* |
Swahili | sw.* |
Swedish | sv.* |
syr | syr |
Tagalog | tl.* |
Tamil | ta.* |
Tatar | tt.* |
Telugu | te.* |
Thai | th.* |
Tswana | tn.* |
Turkish | tr.* |
Urdu | ur.* |
Ukrainian | uk.* |
Uzbek | uz.* |
Vietnamese | vi.* |
Welsh | cy.* |
Xhosa | xh.* |
Zulu | zu.* |
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 |
Basque – Spain | eu_ES |
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 – Andorra | en_AD |
English – Albania | en_AL |
English – Australia | en_AU |
English – Austria | en_AT |
English – Belgium | en_BE |
English – Bulgaria | en_BG |
English – Bahrain | en_BH |
English – Brazil | en_BR |
English – Canada | en_CA |
English – Canary Islands | en_IC |
English – Croatia | en_HR |
English – Czech Republic | en_CZ |
English – Denmark | en_DK |
English – Estonia | en_EE |
English – Egypt | en_EG |
English – Finland | en_FI |
English – France | en_FR |
English – Germany | en_DE |
English – Greece | en_GR |
English – Hong Kong | en_HK |
English – Hungary | en_HU |
English – India | en_IN |
English – Ireland | en_IE |
English – Israel | en_IL |
English – Italy | en_IT |
English – Jordan | en_JO |
English – Japan | en_JP |
English – Korea | en_KR |
English – Kuwait | en_KW |
English – Latvia | en_LV |
English – Lithuania | en_LT |
English – Luxembourg | en_LU |
English – Macao | en_MO |
English – Mainland China | en_CN |
English – Malaysia | en_MY |
English – Malta | en_MT |
English – Mexico | en_MX |
English – Monaco | en_MC |
English – Montenegro | en_ME |
English – Netherlands | en_NL |
English – North Macedonia | en_MK |
English – Norway | en_NO |
English – New Zealand | en_NZ |
English – Oman | en_OM |
English – Philippines | en_PH |
English – Poland | en_PL |
English – Portugal | en_PT |
English – Qatar | en_QA |
English – Romania | en_RO |
English – Russia | en_RU |
English – Saudi Arabia | en_SA |
English – Serbia | en_RS |
English – Singapore | en_SG |
English – Slovakia | en_SK |
English – Slovenia | en_SI |
English – Spain | en_ES |
English – Sweden | en_SE |
English – Switzerland | en_CH |
English – South Africa | en_ZA |
English – Taiwan | en_TW |
English – Thailand | en_TH |
English – Turkey | en_TR |
English – Ukraine | en_UA |
English – United Kingdom | en_GB |
English – United Arab Emirates | en_AE |
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 |
Galician – Spain | gl_ES |
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 |
Hebrew – Israel | he_IL |
Hindi – India | hi_IN |
Hungarian – Hungary | hu_HU |
Icelandic – Iceland | is_IS |
Indonesian New – Indonesia | id_ID |
Indonesian – Indonesia | in_ID |
Irish – Ireland | ga_IE |
Italian – Italy | it_IT |
Italian – Switzerland | it_CH |
Japanese – Japan | ja_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 | nb_NO |
Norwegian – Norway | nn_NO |
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 | sr_RS |
Slovak – Slovakia | sk_SK |
Slovenian – Slovenia | sl_SI |
Spanish – Argentina | es_AR |
Spanish – Bolivia | es_BO |
Spanish – Canary Islands | es_IC |
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 |
Turkish – Turkey | tr_TR |
Ukrainian – Ukraine | uk_UA |
Vietnamese – Vietnam | vi_VN |
Localizing variations
Site personalization
For campaigns created using either the script-based implementation or API, you can serve a localized version of variations to your site visitors, as follows:
- Make sure the page context is properly defined as detailed in the previous section.
- Define your site languages.
- Define localized values for individual variables in each variation.
- For API campaigns, send the user's locale in the request under the page context (for example, "locale":"fr.*"). Make sure to reference the correct language codes.
Experience Email
For email campaigns, you can serve a localized version of variations to your email users, at open time, as follows:
- Define your languages
- Configure the locale ESP parameter . Use a merge tag that will insert the locale value.
- 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.
- Choose a language (for example, en, es) if you want to localize content per language, regardless of the country.
- Choose a language and country combination (en_US, es_MX) if you want to localize content for languages in a specific country.
- The order defines how they will be displayed in variations and templates. Drag and drop languages to adjust the order. You can delete a language by clicking the X next to it.
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's served on a page that has this language in its page context, or in an email for which the locale code is received through the ESP merge tag, displays localized content for the selected variables, 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 see what the variation will look like to the user:
- On your site: Click Preview on Site. The variation is displayed based on the page context defined for that page.
- In an email: See the Preview your email section of the Experience Email article. The variation is displayed based on the ESP locale parameter.
Localizing recommended products
You can adapt your product recommendation campaigns based on the user locale in several ways.
Display localized product properties
The first way to adapt campaigns to various user locations is to use localized product properties. For example, using different product names for different languages.
To add localized values of any product property (such as price, name, or 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 want to add a German version of the product name, add a column called "lng:de_DE:name", and set the German value for the name as follows:
"name":"White Pants"
"lng:de_DE:name":"weiße Hosen"
The language code should match the name you use in the page context. For details, see Page Context. The language code can have up to two (_) or (-) between the values. For example: "lng:en_EN_X".
Because these columns are optional, blank values do not trigger errors or warnings.
You can create a total of up to 300 columns when working with multiple languages (including all mandatory, custom, and translated columns).
For translations of attributes that have multiple values (such as 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.
Filter products based on user locale
This feature is available for Experience Email, site personalization campaigns, and API recommendations.
If you have different feed values for each locale, you can create a rule to exclude or include (not pin) products and filter products in the campaign based on the user's location. For example, you can choose to include only items that are in sale their area.
For example, if the feed has the following columns:
sku | discounted | lng:FR:discounted |
123 | Yes | No |
234 | No | Yes |
Note the following when setting up your feed columns:
- Do not leave empty values. If you do, while the feed preview appears empty, the system assigns the following values for this filter:
- lng:Price – 0
- lng:In stock – true
Take this into consideration when deciding.
- Make sure all lng columns have a default column (for non-mandatory columns). For example, if you use the column "lng:FR:discounted", you must also have the column "discounted", as in the example above.
You can create a rule that includes only discounted products, but filters out 123 for users with FR locale, and filters out 234 for the rest of the users.
When you create the filter rule, after you choose the property (in this case, "discounted"), choose "By the user's locale":