dist/vue-i18n-gettext.esm.js
function (location) {
    if (typeof location === 'string') {
      var isRelative = location.charAt(0) !== '/';
      var toPath;
      if (this.$i18n.routeAutoPrefix) {
        toPath = pathToRegexp_1.compile(_path('/:_locale?/' + location));
      } else {
        toPath = pathToRegexp_1.compile(location.replace('$locale', ':_locale?'));
      }

      var path = toPath({ _locale: this.$i18n.activeLocale === this.$i18n.defaultLocale ? (this.$i18n.defaultLocaleInRoutes ? this.$i18n.activeLocale : undefined) : this.$i18n.activeLocale });
      return path === '' ? '/' : isRelative ? path.substr(1) : path
    } else {
      return location
    }
    // TODO: Add support when the object contains name and/or path.
  }
function (location) {
    if (typeof location === 'string') {
      var isRelative = location.charAt(0) !== '/';
      var toPath;
      if (this.$i18n.routeAutoPrefix) {
        toPath = pathToRegexp_1.compile(_path('/:_locale?/' + location));
      } else {
        toPath = pathToRegexp_1.compile(location.replace('$locale', ':_locale?'));
      }

      var path = toPath({ _locale: this.$i18n.activeLocale === this.$i18n.defaultLocale ? (this.$i18n.defaultLocaleInRoutes ? this.$i18n.activeLocale : undefined) : this.$i18n.activeLocale });
      return path === '' ? '/' : isRelative ? path.substr(1) : path
    } else {
      return location
    }
    // TODO: Add support when the object contains name and/or path.
  }
function ( location ) { if ( typeof location === 'string' ) { var isRelative = location . charAt ( 0 ) !== '/' ; var toPath ; if ( this . $i18n . routeAutoPrefix ) { toPath = pathToRegexp_1 . compile ( _path ( '/:_locale?/' + location ) ) ; } else { toPath = pathToRegexp_1 . compile ( location . replace ( '$locale' , ':_locale?' ) ) ; } var path = toPath ( { _locale : this . $i18n . activeLocale === this . $i18n . defaultLocale ? ( this . $i18n . defaultLocaleInRoutes ? this . $i18n . activeLocale : undefined ) : this . $i18n . activeLocale } ) ; return path === '' ? '/' : isRelative ? path . substr ( 1 ) : path } else { return location } // TODO: Add support when the object contains name and/or path. }
Converts a router link to the version of the current locale.
Converts a router link to the version of the current locale .