Skip to content

Commit

Permalink
export locale objects
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioCrisostomo committed Nov 4, 2017
1 parent 427dd34 commit b9c1fe7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/index.js
Expand Up @@ -49,7 +49,8 @@ import Tree from './components/tree';
import Upload from './components/upload';
import {Row, Col} from './components/grid';
import {Select, Option, OptionGroup} from './components/select';
import locale from './locale';
import locale from './locale/index';
import locales from './locale/locales';

const iview = {
Affix,
Expand Down Expand Up @@ -149,4 +150,4 @@ if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}

module.exports = Object.assign(iview, {install}); // eslint-disable-line no-undef
module.exports = Object.assign(iview, {install, locales}); // eslint-disable-line no-undef
35 changes: 35 additions & 0 deletions src/locale/locales.js
@@ -0,0 +1,35 @@
// export all locale files

import deDE from './lang/de-DE.js';
import enUS from './lang/en-US.js';
import esES from './lang/es-ES.js';
import frFR from './lang/fr-FR.js';
import idID from './lang/id-ID.js';
import jaJP from './lang/ja-JP.js';
import koKR from './lang/ko-KR.js';
import ptBR from './lang/pt-BR.js';
import ptPT from './lang/pt-PT.js';
import ruRU from './lang/ru-RU.js';
import svSE from './lang/sv-SE.js';
import trTR from './lang/tr-TR.js';
import viVN from './lang/vi-VN.js';
import zhCN from './lang/zh-CN.js';
import zhTW from './lang/zh-TW.js';

export default {
'de-DE': deDE,
'en-US': enUS,
'es-ES': esES,
'fr-FR': frFR,
'id-ID': idID,
'ja-JP': jaJP,
'ko-KR': koKR,
'pt-BR': ptBR,
'pt-PT': ptPT,
'ru-RU': ruRU,
'sv-SE': svSE,
'tr-TR': trTR,
'vi-VN': viVN,
'zh-CN': zhCN,
'zh-TW': zhTW
};

0 comments on commit b9c1fe7

Please sign in to comment.