parent
ca5bce477e
commit
edf63f8b51
@ -0,0 +1,12 @@ |
||||
const fs = require('fs') |
||||
const path = require('path') |
||||
const promisify = require('pify') |
||||
|
||||
async function getLocaleMessages () { |
||||
const localeMessagesPath = path.join(process.cwd(), 'app', '_locales', 'en', 'messages.json') |
||||
const enLocaleMessagesJSON = await promisify(fs.readFile)(localeMessagesPath) |
||||
const enLocaleMessages = JSON.parse(enLocaleMessagesJSON) |
||||
return enLocaleMessages |
||||
} |
||||
|
||||
module.exports = getLocaleMessages |
Loading…
Reference in new issue