import { getLanguage, generateTitle, getPageTitle, commonMessages, $tx } from '../../../common/lang/index'
import wappsMessages from '../../../ecwapp/lang/index'
import wplatMessages from '../../../ecwplat/lang/index'
import wplusMessages from '../../../ecwplus/lang/index'

const messages = {}
messages.en = {
    ...commonMessages.en,
    ...wappsMessages.en,
    ...wplatMessages.en,
    ...wplusMessages.en
}
messages.zhCN = {
    ...commonMessages.zhCN,
    ...wappsMessages.zhCN,
    ...wplatMessages.zhCN,
    ...wplusMessages.zhCN
}
messages.es = {
    ...commonMessages.es,
    ...wappsMessages.es,
    ...wplatMessages.es,
    ...wplusMessages.es
}
messages.ja = {
    ...commonMessages.ja,
    ...wappsMessages.en,
    ...wplatMessages.ja,
    ...wplusMessages.ja
}

const lang = {}
lang.aiomessages = messages
lang.generateTitle = generateTitle
lang.getPageTitle = getPageTitle
lang.getLanguage = getLanguage
lang.$tx = $tx

export default lang
