dist/shopify.i18n.js
function init(defaultLocale, defaultLocaleAssetUrl, defaultCurrency) {
    // Store default/initial settings.
    _defaultLocale = defaultLocale;
    _defaultLocaleAssetUrl = defaultLocaleAssetUrl;
    _defaultCurrency = defaultCurrency;

    // Store default currency against the Currency object.
    Currency.currentCurrency = _defaultCurrency;

    // See if we have a saved locale in our cookie that's different to our current one. If so, translate to it.
    var cookieLocale = localeCookie.read();
    if(cookieLocale && cookieLocale.length && (cookieLocale != _defaultLocale)) {
      translate(cookieLocale);
    }

    // See if we have a saved currency in our cookie that's different to our current one. If so, convert to it.
    var cookieCurrency = Currency.cookie.read();
    if(cookieCurrency && cookieCurrency.length && (cookieCurrency != _defaultCurrency)) {
      convert(cookieCurrency);
    }

    // Create event listeners.
    $(document).on('change', '[data-change="locale"]', localeChangedHandler);
    $(document).on('change', '[data-change="currency"]', currencyChangedHandler);
    $(document).on('click', '[data-toggle="currency"]', currencyToggledHandler);
  }
function init(defaultLocale, defaultLocaleAssetUrl, defaultCurrency) {
    // Store default/initial settings.
    _defaultLocale = defaultLocale;
    _defaultLocaleAssetUrl = defaultLocaleAssetUrl;
    _defaultCurrency = defaultCurrency;

    // Store default currency against the Currency object.
    Currency.currentCurrency = _defaultCurrency;

    // See if we have a saved locale in our cookie that's different to our current one. If so, translate to it.
    var cookieLocale = localeCookie.read();
    if(cookieLocale && cookieLocale.length && (cookieLocale != _defaultLocale)) {
      translate(cookieLocale);
    }

    // See if we have a saved currency in our cookie that's different to our current one. If so, convert to it.
    var cookieCurrency = Currency.cookie.read();
    if(cookieCurrency && cookieCurrency.length && (cookieCurrency != _defaultCurrency)) {
      convert(cookieCurrency);
    }

    // Create event listeners.
    $(document).on('change', '[data-change="locale"]', localeChangedHandler);
    $(document).on('change', '[data-change="currency"]', currencyChangedHandler);
    $(document).on('click', '[data-toggle="currency"]', currencyToggledHandler);
  }
function init ( defaultLocale , defaultLocaleAssetUrl , defaultCurrency ) { // Store default/initial settings. _defaultLocale = defaultLocale ; _defaultLocaleAssetUrl = defaultLocaleAssetUrl ; _defaultCurrency = defaultCurrency ; // Store default currency against the Currency object. Currency . currentCurrency = _defaultCurrency ; // See if we have a saved locale in our cookie that's different to our current one. If so, translate to it. var cookieLocale = localeCookie . read ( ) ; if ( cookieLocale && cookieLocale . length && ( cookieLocale != _defaultLocale ) ) { translate ( cookieLocale ) ; } // See if we have a saved currency in our cookie that's different to our current one. If so, convert to it. var cookieCurrency = Currency . cookie . read ( ) ; if ( cookieCurrency && cookieCurrency . length && ( cookieCurrency != _defaultCurrency ) ) { convert ( cookieCurrency ) ; } // Create event listeners. $ ( document ) . on ( 'change' , '[data-change="locale"]' , localeChangedHandler ) ; $ ( document ) . on ( 'change' , '[data-change="currency"]' , currencyChangedHandler ) ; $ ( document ) . on ( 'click' , '[data-toggle="currency"]' , currencyToggledHandler ) ; }
Initialise the i18n module.

@param defaultLocale
@param defaultLocaleAssetUrl
@param defaultCurrency
Initialise the i18n module .