Skip to main content

Zone Definitions

zone

By default, the i18nBundle works with the global settings (see example below). But you may need some more complex structures, so we implemented the zone manager.

Default Configuration Options

NameDescription
locale_adapterLocale Adapter (system, by default)
default_localeDefine a default locale (like de, en_US)
translationsStatic Route translations
zonesArray for complex Zones

Zone Configuration Options

Basically there are the same options as in the default configuration, except that you can't define zones within zones.

NameDescription
locale_adapterLocale Adapter (system by default)
default_localeDefine a default locale (like de, en_US)
translationsStatic Route translations

Assigning a Site to a Zone

Zones are assigned per site via the OpenDXP admin. After you've configured the zone (see config below), open the site settings in backoffice and select the desired zone from the Zone dropdown (under the i18n configuration scope).

Configuration

opendxp_i18n:
# define a locale adapter (system|custom)
locale_adapter: system
# define a default locale - this value is optional
default_locale: 'en'
# define scheme
request_scheme: 'http'
# define port
request_port: 80
# static route translations
translations: ~

zones:
# zone 1: language
zone1:
id: 1
config:
locale_adapter: system
translations: ~

# zone 2: language and country
zone2:
id: 2
config:
locale_adapter: system
translations: ~

# zone 3: no language switch. just a simple website.
zone3:
id: 3
config:
locale_adapter: system
translations: ~