dist/vue-i18n-gettext.esm.js
function (options) {
  var _options = {
    messages: options.messages || {},
    numberFormat: options.numberFormat || {},
    currencyFormat: options.currencyFormat || {},
    dateFormat: options.dateFormat || {},
    numberFormats: options.numberFormats || {},
    currencyFormats: options.currencyFormats || {},
    currencyLocaleFormats: options.currencyLocaleFormats || {},
    dateFormats: options.dateFormats || {},
    defaultCurrency: options.defaultCurrency || 'USD',
    currencies: options.currencies || {},
    persistCurrency: options.persistCurrency === undefined ? true : options.persistCurrency,
    defaultLocale: options.defaultLocale || 'en',
    allLocales: options.allLocales || (options.defaultLocale ? [options.defaultLocale] : ['en']),
    forceReloadOnSwitch: options.forceReloadOnSwitch === undefined ? true : options.forceReloadOnSwitch,
    usingRouter: options.usingRouter === undefined ? false : options.usingRouter,
    defaultLocaleInRoutes: options.defaultLocaleInRoutes === undefined ? false : options.defaultLocaleInRoutes,
    routingStyle: options.routingStyle || 'changeLocale',
    routeAutoPrefix: options.routeAutoPrefix === undefined ? true : options.routeAutoPrefix,
    // TODO: Implement better storageMethod parsing.
    storageMethod: typeof options.storageMethod !== 'object' ? (['session', 'local', 'cookie'].includes(options.storageMethod.trim()) ? options.storageMethod.trim() : 'local') : 'custom',
    storageKey: options.storageKey || '_vue_i18n_gettext_locale',
    cookieExpirationInDays: options.cookieExpirationInDays || 30,
    customOnLoad: options.customOnLoad
  };

  if (_options.storageMethod === 'custom') {
    _options.storageFunctions = options.storageMethod;
  }

  return _options
}
function (options) {
  var _options = {
    messages: options.messages || {},
    numberFormat: options.numberFormat || {},
    currencyFormat: options.currencyFormat || {},
    dateFormat: options.dateFormat || {},
    numberFormats: options.numberFormats || {},
    currencyFormats: options.currencyFormats || {},
    currencyLocaleFormats: options.currencyLocaleFormats || {},
    dateFormats: options.dateFormats || {},
    defaultCurrency: options.defaultCurrency || 'USD',
    currencies: options.currencies || {},
    persistCurrency: options.persistCurrency === undefined ? true : options.persistCurrency,
    defaultLocale: options.defaultLocale || 'en',
    allLocales: options.allLocales || (options.defaultLocale ? [options.defaultLocale] : ['en']),
    forceReloadOnSwitch: options.forceReloadOnSwitch === undefined ? true : options.forceReloadOnSwitch,
    usingRouter: options.usingRouter === undefined ? false : options.usingRouter,
    defaultLocaleInRoutes: options.defaultLocaleInRoutes === undefined ? false : options.defaultLocaleInRoutes,
    routingStyle: options.routingStyle || 'changeLocale',
    routeAutoPrefix: options.routeAutoPrefix === undefined ? true : options.routeAutoPrefix,
    // TODO: Implement better storageMethod parsing.
    storageMethod: typeof options.storageMethod !== 'object' ? (['session', 'local', 'cookie'].includes(options.storageMethod.trim()) ? options.storageMethod.trim() : 'local') : 'custom',
    storageKey: options.storageKey || '_vue_i18n_gettext_locale',
    cookieExpirationInDays: options.cookieExpirationInDays || 30,
    customOnLoad: options.customOnLoad
  };

  if (_options.storageMethod === 'custom') {
    _options.storageFunctions = options.storageMethod;
  }

  return _options
}
function ( options ) { var _options = { messages : options . messages || { } , numberFormat : options . numberFormat || { } , currencyFormat : options . currencyFormat || { } , dateFormat : options . dateFormat || { } , numberFormats : options . numberFormats || { } , currencyFormats : options . currencyFormats || { } , currencyLocaleFormats : options . currencyLocaleFormats || { } , dateFormats : options . dateFormats || { } , defaultCurrency : options . defaultCurrency || 'USD' , currencies : options . currencies || { } , persistCurrency : options . persistCurrency === undefined ? true : options . persistCurrency , defaultLocale : options . defaultLocale || 'en' , allLocales : options . allLocales || ( options . defaultLocale ? [ options . defaultLocale ] : [ 'en' ] ) , forceReloadOnSwitch : options . forceReloadOnSwitch === undefined ? true : options . forceReloadOnSwitch , usingRouter : options . usingRouter === undefined ? false : options . usingRouter , defaultLocaleInRoutes : options . defaultLocaleInRoutes === undefined ? false : options . defaultLocaleInRoutes , routingStyle : options . routingStyle || 'changeLocale' , routeAutoPrefix : options . routeAutoPrefix === undefined ? true : options . routeAutoPrefix , // TODO: Implement better storageMethod parsing. storageMethod : typeof options . storageMethod !== 'object' ? ( [ 'session' , 'local' , 'cookie' ] . includes ( options . storageMethod . trim ( ) ) ? options . storageMethod . trim ( ) : 'local' ) : 'custom' , storageKey : options . storageKey || '_vue_i18n_gettext_locale' , cookieExpirationInDays : options . cookieExpirationInDays || 30 , customOnLoad : options . customOnLoad } ; if ( _options . storageMethod === 'custom' ) { _options . storageFunctions = options . storageMethod ; } return _options }
Parse configuration and return normalized values.
Parse configuration and return normalized values .