code: function ADD_LOCALE(state, payload) {
        // reduce the given translations to a single-depth tree
        var translations = flattenTranslations(payload.translations);
  
        if (state.translations.hasOwnProperty(payload.locale)) {
          // get the existing translations
          var existingTranslations = state.translations[payload.locale]; // merge the translations
  
          state.translations[payload.locale] = Object.assign({}, existingTranslations, translations);
        } else {
          // just set the locale if it does not yet exist
          state.translations[payload.locale] = translations;
        } // make sure to notify vue of changes (this might break with new vue versions)
  
  
        try {
          if (state.translations.__ob__) {
            state.translations.__ob__.dep.notify();
          }
        } catch (ex) {}
      }
docs: add a new locale