> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kleep.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Markets and Languages

> Sell one catalogue on several sites and in several languages.

This page applies when one catalogue is sold on several sites or in several languages, and the product page URL, title, description or sizes change between them.

* A **market** is a site with its own online products and product pages: a country (France, Canada) or a group of countries (a Europe site).
* A **language** is a version of that site. A market can have several, for instance Canada in French and in English.

Three values place every request and every file:

| Value | What it selects | Where you set it |
| - | - | - |
| Environment | A separate catalogue: production, staging or development | `public_id` on pages and apps, top folder on SFTP |
| Market | The products online and their pages | Country code on pages, market folder on SFTP |
| Language | The texts shown | Language code on pages, market folder on SFTP |

Before your first export, send your Kleep contact:

* the environments you use, and the markets and languages in each
* the countries each market sells to
* the default language of each market
* your **main market** (see [Product files](#3-product-files))

***

## 1. Environments

Kleep gives you one `public_id` per environment. All markets and languages of an environment share it.

| Environment | `public_id` | SFTP folder |
| - | - | - |
| Production | Your production id | `/prod` |
| Staging | Your staging id | `/staging` |
| Development, test | Your development id | `/dev` |

* Pages and apps send the id of their own environment: a staging page with the production id reads the production catalogue. The iOS SDK takes it as `retailerName`, the Android SDK in `setRetailer`.
* One SFTP access covers all environments. The environment folder goes above the market folders.
* Environments share no data: each one needs its own files, including the main market's.
* Only production data goes into `/prod`. If you only send production data, you can skip the environment folder.

***

## 2. Storefront parameters

Send the language of the page and the country code on every page where Kleep runs.

| Integration | Language | Country |
| - | - | - |
| [JS Library](https://docs.kleep.ai/cms/js-library/ai-sizing.md) (`kleep.load`, `kleep.requestSize`) | `lang` | `market` |
| [AI Search](https://docs.kleep.ai/cms/js-library/search.md) | `shopLocale` | `countryCode` |
| [AI Recommendations](https://docs.kleep.ai/cms/js-library/recommendations.md) | `context.market.locale` | `context.market.country` |
| [SFCC cartridge](https://docs.kleep.ai/cms/sfcc/configuration.md) | Handled by the cartridge | `kleepCountryCode`, set on each site |
| [React Native SDK](https://docs.kleep.ai/mobile/react-native.md) | `language` | `countryCode` |
| [iOS](https://docs.kleep.ai/mobile/ios.md) and [Android](https://docs.kleep.ai/mobile/android.md) SDKs | Language parameter | Not available |

```javascript theme={null}
// Canadian site, French page
kleep.load({
  public_id: "UUID",
  product_id: "MODEL123",
  lang: "fr",
  market: "CA",
  selectors: { sizing: ["#kleep-container"] }
})
```

Formats and supported values: [AI Sizing parameters](https://docs.kleep.ai/cms/js-library/ai-sizing.md#parameters).

* On a site selling to several countries, pass the shopper's country (`DE`, `BE`…), not a region code such as `EU`. Kleep links each country to its market.
* Without a country, or with one that belongs to none of your markets, Kleep reads your main market.
* The language also selects the catalogue texts of the market. When the market has no catalogue in that language, its default language is used.

Prices and stock per market: [Prices, Stocks & Titles translations](https://docs.kleep.ai/data/data-transfers-template#prices-stocks-%26-titles-translations).

***

## 3. Product files

Send **one products file for each market and language**, with the columns of the [template](https://docs.kleep.ai/data/data-transfers-template#1-product).

| Must be identical in every file | Written for the market and language of the file |
| - | - |
| `product_id`, `variant_id` | `title`, `description`, `url`, `color`, `size_label`, `size_system`, `active` |

* Your **main market**'s file in its default language must list every product and size you sell on any market. A product missing from it is not imported.
* Every market needs a file in its default language: it says what the market sells.
* `size_label` is the size shown to the shopper on that site. When the scale changes between markets, `size_system` changes with it (see [Size systems](https://docs.kleep.ai/data/data-transfers-template#size-systems)).

The same variant in two files:

| Folder | `product_id` | `variant_id` | `size_label` | `size_system` |
| - | - | - | - | - |
| `fr-fr` | `MODEL123` | `MODEL123-36` | `36` | `FR` |
| `uk-en` | `MODEL123` | `MODEL123-36` | `8` | `UK` |

***

## 4. SFTP folders

One folder for each market and language, under its environment folder: naming and layout are in the [SFTP Data Structure](https://docs.kleep.ai/data/sftp-structure.md#1-introduction).

Orders and returns use the same `product_id` and `variant_id` as the products files. Agree with your Kleep contact which folder they go into before the first export.

***

## 5. Common cases

| Your site | Folders | Pages send (country, language) |
| - | - | - |
| France, in French | `fr-fr` | `FR`, `fr` |
| Canada, in French and English | `ca-fr`, `ca-en` | `CA`, `fr` or `en` |
| Europe site, several countries | `eu-fr`, `eu-en` | The shopper's country (`DE`, `BE`…), `fr` or `en` |
| United Kingdom | `uk-en` | `GB`, `en` |
| Europe and US sharing the same English | `eu-en` and `us-en`, both filled | The shopper's country, `en` |

| Your catalogue | What to send |
| - | - |
| A product is sold on some markets only | List it in the main market's file, and with `active` `true` in the files of the markets selling it. If the main market does not sell it, `active` is `false` there |
| A product is removed from one market | Keep it in that market's files with `active` `false` |

***

## 6. Opening a new market or language

1. Email your Kleep contact before the first file, with the environment, countries and languages of the new site.
2. Kleep creates it on its side.
3. Add its folder and products file to your daily export, in each environment concerned.
4. Pass its language and country codes on its pages.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.