Opencart auto-detect currency and language
- Wynn Teo
- Sep 15, 2017
- 1 min read

One of my client required to auto-detect currency and language for his eCommerce site. So, I decided to write one simple extension to cater the requirement. In Opencart extensions marketplace there are a few similar script, but it you need to pay for it.
The code simply detect visitor’s IP address, and get the country code. With the country code, we then switch the currency and language accordingly. Currently, the script only support US, China, France, Singapore and Malaysia others country will go with default setting.
The code is pretty straightforward, flexible and ease to modify, developer can easily expand the country based on client needs. It doesn’t include user interface configuration, maybe in future will do so. Feel free to comment if you have problem on using it.
The code is available at auto-detect currency and language in Opencart extension.
1. China

2. France

3. Singapore

Comments