src/index.js
function loadTranslation(localeFilePath) {
    if(typeof localeFilePath == "undefined"){
        messages = defaultMessages;
        return null;
    }
    let fp = path.join(__dirname, localeFilePath);
    messages = require('jsonfile').readFileSync("." + fp);
    return messages;
}
function loadTranslation(localeFilePath) {
    if(typeof localeFilePath == "undefined"){
        messages = defaultMessages;
        return null;
    }
    let fp = path.join(__dirname, localeFilePath);
    messages = require('jsonfile').readFileSync("." + fp);
    return messages;
}
function loadTranslation ( localeFilePath ) { if ( typeof localeFilePath == "undefined" ) { messages = defaultMessages ; return null ; } let fp = path . join ( __dirname , localeFilePath ) ; messages = require ( 'jsonfile' ) . readFileSync ( "." + fp ) ; return messages ; }
Loads translation file.
@param {string} localeFilePath
@return {object} messages
Loads translation file .