Multiple locales¶
A market can have more than one locale. This is common for sites in countries where multiple languages are spoken, such as Canada (English and French), Belgium (Dutch and French), and Switzerland (German, French, and Italian).
If the visitor behavior within a market is expected to differ depending on what language the visitor use, it is recommended to use multiple markets, each with their own locale. Multiple locales within the same market should generally only be used if the visitor behavior is not expected to differ within the market regardless of what site language the visitor use.
Import products and variants¶
Products and variants all have their unique identifying keys. Using multiple locales in a market requires the keys to also be unique even though the actual product item is the same.
A common approach is to append both the product and variant keys with the locale identifier. For example a product key used in a market with one locale, <product_key>1234567-1</product_key>
, can in a multilingual country as Canada be split into two products with <product_key>1234567-1_fr_ca</product_key>
and <product_key>1234567-1_en_ca</product_key>
.
Example¶
Fashion/apparel/lifestyle product example
...
<product>
<product_key>1234567-1_en_ca</product_key>
<title>Free Run 2</title>
<url>/en_ca/products/1234567</url>
<has_image>true</has_image>
<image_url>/images/products/1234567-1.jpg</image_url>
<price>99.00</price>
<market_id>CA</market_id>
<locale>en-CA</locale>
<release_date>2017-03-10</release_date>
<section>men-running-shoes</section>
<brand>Nike</brand>
<color>Black</color>
<variants>
<variant>
<variant_key>1234567-1-42_fr_en</variant_key>
<size>42</size>
<in_stock>true</in_stock>
</variant>
<variant>
<variant_key>1234567-1-43_fr_en</variant_key>
<size>43</size>
<in_stock>true</in_stock>
</variant>
</variants>
</product>
<product>
<product_key>1234567-1_fr_ca</product_key>
<title>Free Run 2</title>
<url>/fr_ca/products/1234567</url>
<has_image>true</has_image>
<image_url>/images/products/1234567-1.jpg</image_url>
<price>99.00</price>
<market_id>CA</market_id>
<locale>fr-CA</locale>
<release_date>2017-03-10</release_date>
<section>garçon-running-chaussures</section>
<brand>Nike</brand>
<color>Noir</color>
<variants>
<variant>
<variant_key>1234567-1-42_fr_ca</variant_key>
<size>42</size>
<in_stock>true</in_stock>
</variant>
<variant>
<variant_key>1234567-1-43_fr_ca</variant_key>
<size>43</size>
<in_stock>true</in_stock>
</variant>
</variants>
</product>
<product>
<product_key>1234567-2_en_ca</product_key>
<title>Free Run 2</title>
<url>/en_ca/products/1234567/2</url>
<has_image>true</has_image>
<image_url>/images/products/1234567-2.jpg</image_url>
<price>99.00</price>
<market_id>CA</market_id>
<locale>en-CA</locale>
<release_date>2017-03-10</release_date>
<section>men-running-shoes</section>
<brand>Nike</brand>
<color>White</color>
<variants>
<variant>
<variant_key>1234567-2-42_en_ca</variant_key>
<size>42</size>
<in_stock>false</in_stock>
</variant>
<variant>
<variant_key>1234567-2-43_en_ca</variant_key>
<size>43</size>
<in_stock>true</in_stock>
</variant>
</variants>
</product>
...