Skip to content

Shop & Language ID Mapping

Brekz operates one PrestaShop multistore instance per country/language combination. Every Brekz application that touches shop- or language-specific data (cache keys, API calls, feeds, CRM syncs, ...) uses the numeric id_shop and id_lang identifiers defined in brekz-prestashop. This page is the single source of truth for that mapping so it doesn't have to be rediscovered — or worse, guessed — in every service.

This mapping is not PrestaShop-specific

Although the IDs originate in brekz-prestashop's database, they are reused as-is across the platform: brekz-website, brekz-copernica, brekz-feeds, brekz-logistics, brekz-shop-backend and others all key data off the same id_shop / id_lang values. Wherever you see id_shop or id_lang in another service, this table applies.


The mapping

id_shop Shop constant Country / shop Domain id_lang Language Locale
1 ID_SHOP_GERMANY Germany brekz.de 3 German de_DE
2 ID_SHOP_BELGIUM Belgium brekz.be 8 Dutch (Belgium) nl_BE
3 ID_SHOP_FRANCE France brekz.fr 5 French fr_FR
4 ID_SHOP_NETHERLANDS Netherlands brekz.nl 7 Dutch nl_NL
5 ID_SHOP_ITALY Italy brekz.it 9 Italian it_IT
6 ID_SHOP_AUSTRIA Austria brekz.at 11 Austrian German de_AT
7 ID_SHOP_DENMARK Denmark brekz.dk 10 Danish da_DK
8 ID_SHOP_SWITZERLAND_DE Switzerland (DE) brekz.ch /de/ 3 German de_DE
9 ID_SHOP_SWITZERLAND_FR Switzerland (FR) brekz.ch /fr/ 5 French fr_FR
10 ID_SHOP_SWEDEN Sweden brekz.se 12 Swedish not mapped, falls back to en_UK (see note below)

Language ID is not always unique to a shop

Shops 8 and 9 (the two Swiss shops) don't have their own language: shop 8 reuses id_lang = 3 (German, same as shop 1) and shop 9 reuses id_lang = 5 (French, same as shop 3). Do not assume id_lang uniquely identifies an id_shop — always key data on id_shop when it's shop-specific (e.g. domain, cache files), and only fall back to id_lang for genuinely language-specific content (e.g. translated strings).

Sweden has no locale mapping

Language::getLocale() (see below) has no case for id_lang = 12 (Swedish), so it silently falls through to the default branch and returns en_UK. This is a gap in the source code, not a documentation error — flag it if you touch locale-dependent code for the Swedish shop.

Austria changed language ID in 2017

Shop 6 (Austria) originally shared id_lang = 3 (generic German) with Germany. A dedicated id_lang = 11 ("Austrian German") was introduced in 2017 (BRALL-744) and PS_LANG_DEFAULT for shop 6 was migrated to it. Historical data recorded before that migration may still reference id_lang = 3 for Austria.

id_lang = 1 (English, en-us) exists in the lang table but is not assigned to any storefront shop — it's used for the PrestaShop back office only. id_lang values 2, 4 and 6 are unused/deleted PrestaShop defaults.


Where this is defined

The mapping is not stored in a config file or .env — it lives in PHP class constants and a handful of database migrations in brekz-prestashop:

Source What it defines
web/override/classes/Shop.php id_shop constants (ID_SHOP_GERMANY, ..., ID_SHOP_SWEDEN)
web/override/classes/Language.php id_lang constants and Language::getLocale($id_lang) (id_lang → locale)
db/BRALL-622-Migration-Cleanup/20160810095955_create_shop_alternate_languages_table.php Original id_shopid_lang seed for shops 1–6
db-migrations/20170323123543_add_da_to_shop_alternate_languages_tabel.php Adds shop 7 (Denmark)
db-migrations/20170410133220_brall744_add_austrian_german_language.php Migrates shop 6 (Austria) from id_lang 3 to id_lang 11
db/BRALL-2460-Brekz.CH-language-DE-create-scripts/ Creates shop 8 (Switzerland DE)
db/BRALL-2460-Brekz.CH-language-FR-create-scripts/ Creates shop 9 (Switzerland FR)
db/BR-4821-Brekz.SE-create-scripts/ Creates shop 10 (Sweden)

At runtime, the ps_shop_alternate_languages table (read by the brekz_alternatelinks module for hreflang tags) is the database-level source of truth and mirrors the constants above.

web/override/classes/Shop.php
const ID_SHOP_GERMANY = 1;
const ID_SHOP_BELGIUM = 2;
const ID_SHOP_FRANCE = 3;
const ID_SHOP_NETHERLANDS = 4;
const ID_SHOP_ITALY = 5;
const ID_SHOP_AUSTRIA = 6;
const ID_SHOP_DENMARK = 7;
const ID_SHOP_SWITZERLAND_DE = 8;
const ID_SHOP_SWITZERLAND_FR = 9;
const ID_SHOP_SWEDEN = 10;
web/override/classes/Language.php
const LANG_ENGLISH = 1;
const LANG_GERMAN = 3;
const LANG_FRENCH = 5;
const LANG_DUTCH = 7;
const LANG_FLEMISH = 8;
const LANG_ITALIAN = 9;
const LANG_DANISH = 10;
const LANG_AUSTRIAN_GERMAN = 11;
const LANG_SWEDEN = 12;

Used by

This mapping surfaces in several other places in the documentation and codebase:

  • A/B Testing Configuration — the page-index cache file is keyed as page_index_{id_shop}_{id_lang}.json.
  • brekz-prestashop service documentation
  • brekz-website's PRESTASHOP_SHOP_ID environment variable and App\Helpers\ShopHelper.
  • brekz-copernica's config/copernica.php (shops.{id_shop} array with the Copernica account per shop).

Adding a new shop or language

When a new country/shop is added, update this page alongside the brekz-prestashop constants so the mapping stays authoritative for every downstream application.