Localized WordPress content for different sub-locales of same language?

I have a site which serves Ireland & England. I want to move it to WordPress.

Currently all the content is the same when you visit the site & it runs off two urls, the Irish one: mysite.ie & the english mysite.co.uk

I need to show different prices based on whether the user is visiting the Irish site or the English one. Currently I do something like:

$host = $_SERVER['HTTP_HOST']; 
if($host == "www.mysite.ie") {
 //show Irish prices
}

I don’t think I can run one WP installation off 2 domains for a start.

It’s not multilingual, so is there a way to show all the same content except for small differences based on the URL?

1 Answer
1

Well, actually, you should view your site as requiring “multilingual” capabilities, even if the base language for both countries is identical, because the actual locale for each is nevertheless different.

More specifically, you can create variant “translations” for your British (‘en_GB’) and Irish (‘en_IE’) localizations. A plugin such WPML (WordPress Multilingual) can help you implement this, and it supports different URL schemes for differentiating between the localizations, including:

  • different domains (or subdomains)
  • different subdirectories

Leave a Comment