How to serve different "posts" to different "countries"?

We run an international ecommerce business. Prices, currencies, products, topics, referring URLs, etc are very often different from a UK to a US customer.

Therefore, for our blog to run on Ghost, is there a way to designate content for different geographies and users? Simply recognising the IP address could work and adding some kind of attribute to each post in conjunction would be the solution I imagine.

Hey @top_hat :wave:. We’ve just updated one of our tutorials which shows how to publish content in multiple regions:
https://ghost.org/tutorials/multi-language-content/

To automatically redirect users you could use some javascript like this which hooks into the set language within the browser: jquery - JavaScript redirect users based on browser language (Chrome Extension) - Stack Overflow

The code would look something like this:

<script>
if (window.navigator.language === 'en-US') { 
  window.location.href = 'https://example.com/us/';
}
</script>

Hope this helps!

1 Like

I don’t think it’s entirely on Ghost. I need You need to have cctld enabled in your website to do it the easiest way.

@DavidDarnes Is it possible to use the above method to accept money in a different currency from users?

Hey, Zen!

And you can also check out the API:

2 Likes