app/mixins/i18n.js
/**
     * Sets the application locale to the given value
     * Loads locale messages if needed
     *
     * @param   {string}    locale    A locale identifier
     *
     * @returns {Promise}
     */
Sets the application locale to the given value
Loads locale messages if needed

@param   {string}    locale    A locale identifier

@returns {Promise}
Sets the application locale to the given value Loads locale messages if needed @param { string } locale A locale identifier @returns { Promise }
i18nSetLocale(locale) { 
      const { $i18n } = window.vm;
      if ($i18n.locale !== locale) {
        return this.i18nLoadMessages(locale).then((newLocale) => {
          $i18n.locale = newLocale;
        });
      }
      return Promise.resolve(locale);
    }
i18nSetLocale ( locale ) { const { $i18n } = window . vm ; if ( $i18n . locale !== locale ) { return this . i18nLoadMessages ( locale ) . then ( ( newLocale ) => { $i18n . locale = newLocale ; } ) ; } return Promise . resolve ( locale ) ; }
Sets the application locale to the given value
 Loads locale messages if needed
Sets the application locale to the given value Loads locale messages if needed
// eslint-disable-line no-param-reassign