Use a Multi-Environment configuration to set the siteUrl for your two locales, en_au
and en_us
, independently for each domain like so:
'project.com.au' => array(
'siteUrl' => array(
'en_au' => 'http://project.com.au/',
'en_us' => 'http://project.co/',
),
),
'project.co.nz' => array(
'siteUrl' => array(
'en_au' => 'http://project.co.nz/',
'en_us' => 'http://project.co/',
),
),
'project.co.za' => array(
'siteUrl' => array(
'en_au' => 'http://project.co.za/',
'en_us' => 'http://project.co/',
),
),
'project.co' => array(
'siteUrl' => array(
'en_au' => 'http://project.com.au/',
'en_us' => 'http://project.co/',
),
),
You can also set additional environment / domain specific variables in the config file. You could set the currency or the timezone for each domain:
'project.com.au' => array(
'currency' => 'AUD',
'timeZone' => 'UTC+10',
'siteUrl' => array(
'en_au' => 'http://project.com.au/',
'en_us' => 'http://project.co/',
),
),
This is how you access such a variable in your templates:
{{ craft.config.currency }}