Localization in the Product Feed
Set up your section to support multiple languages for sites serving multiple locations
One way to adapt product recommendation campaigns based on the user locale is to display localized product properties. For filtering based on locale, see the Knowledge Base article.
For example, you can use different product names in the feed 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 Setting Page Context. The language code can have up to two (_) or (-) between the values. For example: "lng:en_EN_X".
We recommended that you use standard language codes (ISO 639-1) and country codes (ISO 3166-1 alpha-2). For example, en_US, en_GB, fr_DE.
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).
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.
- Translated content: Multi-language sections cannot use translated content in context or feed to match the set default language ("lng").
Updated 8 months ago