function init() {
        // This function is called during Ghost's initialization.
        // Reading translation file for messages from core .js files and keeping its content in memory
        // The English file is always loaded, until back-end translations are enabled in future versions.
        // Before that, see previous tasks on issue #6526 (error codes or identifiers, error message
        // translation at the point of display...)
        coreStrings = fs.readFileSync(path.join(__dirname, '..', '..', 'translations', 'en.json'));

        // if translation file is not valid, you will see an error
        try {
            coreStrings = JSON.parse(coreStrings);
        } catch (err) {
            coreStrings = undefined;
            throw err;
        }

        _private.initializeIntl();
    }
function init() {
        // This function is called during Ghost's initialization.
        // Reading translation file for messages from core .js files and keeping its content in memory
        // The English file is always loaded, until back-end translations are enabled in future versions.
        // Before that, see previous tasks on issue #6526 (error codes or identifiers, error message
        // translation at the point of display...)
        coreStrings = fs.readFileSync(path.join(__dirname, '..', '..', 'translations', 'en.json'));

        // if translation file is not valid, you will see an error
        try {
            coreStrings = JSON.parse(coreStrings);
        } catch (err) {
            coreStrings = undefined;
            throw err;
        }

        _private.initializeIntl();
    }
function init ( ) { // This function is called during Ghost's initialization. // Reading translation file for messages from core .js files and keeping its content in memory // The English file is always loaded, until back-end translations are enabled in future versions. // Before that, see previous tasks on issue #6526 (error codes or identifiers, error message // translation at the point of display...) coreStrings = fs . readFileSync ( path . join ( __dirname , '..' , '..' , 'translations' , 'en.json' ) ) ; // if translation file is not valid, you will see an error try { coreStrings = JSON . parse ( coreStrings ) ; } catch ( err ) { coreStrings = undefined ; throw err ; } _private . initializeIntl ( ) ; }
Setup i18n support:
- Load proper language file into memory
Setup i18n support : - Load proper language file into memory
Initializes the language file.