GUARDLABS
GuardLabs · Technical note

Adding Multi-Currency and Multi-Language Support to WooCommerce

1. Select Your Technical Stack

To enable internationalization in WooCommerce, you must handle translated product data (database strings, taxonomies, attributes) and dynamic currency conversion (exchange rates, checkout processing).

  • Integrated Stack (Recommended): WPML + WooCommerce Multilingual (WCML). Provides full translation management, native multi-currency routing, and automatic price rounding.
  • Lightweight Stack: Polylang + WooCommerce Multilingual or TranslatePress combined with a dedicated currency switcher like WOOCS (WooCommerce Currency Switcher).

2. Set Up Language Routing and SEO

Configure language URL structures to ensure search engines correctly index international versions of your catalog.

  • Navigate to your translation plugin settings and set the URL format to Directories (e.g., example.com/fr/product/). Avoid query parameters (?lang=fr) as they cause canonical tag conflicts.
  • Map core WooCommerce pages (Cart, Checkout, My Account, Shop) to translated equivalents under WooCommerce > WooCommerce Multilingual > Store URLs.
  • Ensure hreflang tags are injected into the <head> to notify crawlers of regional variations.

3. Configure Multi-Currency Handling

Multi-currency systems require real-time exchange rates, payment gateway mapping, and rounding rules.

  • Enable Multi-Currency: In WCML or your chosen currency plugin, add your target currencies (e.g., USD, EUR, GBP).
  • Exchange Rate API: Connect an automated exchange rate provider (Fixer.io, Open Exchange Rates) to fetch updated rates daily. Set an exchange rate offset (e.g., +1.5%) to cover foreign transaction processing fees.
  • Price Rounding: Set custom psychological pricing rules per currency (e.g., round to the nearest .99 or .00).
  • Geolocation: Enable native geolocation under WooCommerce > Settings > General > Default customer location > Geolocate to auto-select currency based on visitor IP.

4. Programmatically Bind Currency to Language

If you prefer mapping specific currencies directly to selected site languages rather than IP locations, place this hook in your child theme's functions.php or custom plugin:

/**
 * Dynamic currency switching based on WPML active language code.
 */
add_filter('woocommerce_currency', 'sw_switch_currency_by_language');

function sw_switch_currency_by_language($currency) {
    if (is_admin() && !defined('DOING_AJAX')) {
        return $currency;
    }

    // Retrieve active WPML language code
    $current_lang = apply_filters('wpml_current_language', NULL);

    switch ($current_lang) {
        case 'fr':
        case 'de':
        case 'es':
            return 'EUR';
        case 'en_GB':
            return 'GBP';
        case 'en':
        default:
            return $currency; // Defaults to base store currency
    }
}

5. Payment Gateway and Caching Considerations

  • Gateway Compatibility: Verify that active gateways (e.g., Stripe, PayPal Commerce) support processing in all selected currencies. Unsupported currencies must convert back to the base store currency at checkout.
  • Cache Cookie Segmentation: Configure server-level caching (Nginx, LiteSpeed, or Varnish) to exclude multi-currency session cookies (woocommerce_multi_currency or _wcml_multi_currency) from cache keys to prevent serving incorrect currencies to users.
  • Transients Management: When testing, flush WooCommerce transients under WooCommerce > Status > Tools > Clear transients to clean cached exchange rates.

Need this done? We handle this hands-on at GuardLabs — get in touch for a quote.

Published 2026-07-30 2 min read All articles
Need help with this?

I take on freelance fixes and builds in this area.