app/mixins/i18n.js
/**
     * Load messages for given locale if not already loaded
     *
     * @param   {string}    locale    A locale identifier
     *
     * @returns {Promise}
     */
Load messages for given locale if not already loaded
@param   {string}    locale    A locale identifier

@returns {Promise}
Load messages for given locale if not already loaded @param { string } locale A locale identifier @returns { Promise }
i18nLoadMessages(locale) {
      const { $i18n } = window.vm;
      if (!Object.keys($i18n.messages).includes(locale)) {
        return import( `../translations/${locale}`).then((localeMessages) => {
          $i18n.setLocaleMessage(locale, localeMessages);
          return locale;
        });
      }
      return Promise.resolve(locale);
    }
i18nLoadMessages ( locale ) { const { $i18n } = window . vm ; if ( ! Object . keys ( $i18n . messages ) . includes ( locale ) ) { return import ( ` ${ locale } ` ) . then ( ( localeMessages ) => { $i18n . setLocaleMessage ( locale , localeMessages ) ; return locale ; } ) ; } return Promise . resolve ( locale ) ; }
Load messages for given locale if not already loaded
 @param   {string}    locale    A locale identifier
Load messages for given locale if not already loaded @param { string } locale A locale identifier
/* webpackChunkName: 'lang-[request]' */