Site Config

Countries

These Dijon Platform site configuration methods allow you to manage how Dijon Platform handles countries.

setCountrySpecificDomains

This option allows you to use different domains for different countries. As the site_config.php configuration file applies across all environments you need to specifiy the environment in this file also.

Valid environments are:

  • local
  • develop
  • staging
  • production

Country can be default or a two letter country code which must be in lowercase.

You should be careful when setting this configuration option as getting it wrong will result in both Dijon and the user's browser caching the result.

Example
$config->setCountrySpecificDomains([
    'staging' => [
        'us' => 'us.example.staging.dijon.host',
        'default' => 'example.staging.dijon.host'
    ],
    'production' => [
        'us' => 'donate.example-us.org',
        'default' => 'donate.example.org'
    ]
]);

setDefaultCountry

This sets the default country to be used when doing the intial redirect.

Example
$config->setDefaultCountry('US');

setDisableEmail

Prevents the sending of email to the specified country. This can be called more than once allowing you to specify multiple countries.

Example
$config->setDisableEmail('US');

setLanguageCountryInfo

Sets which language should be shown to users from which countries.

Example
$config->setLanguageCountryInfo([
    'de' => [
        'DE'
    ],
    'fr' => [
        'FR',
        'CH'
    ],
]);

On this page