function _languageFile_load($filepath)
{
    $translation = array();
    if (!file_exists($filepath)) {
        return array();
    }
    //if (!file_exists($filepath))  { die("Language file doesn't exist at '$filepath'!"); }
    // v2.18 - convert old language files
    if (!isStructFile($filepath)) {
        require $filepath;
        _languageFile_save($filepath, $strings);
        // old files stored values in $strings var
    }
    // load file
    $translation = loadStruct($filepath);
    return $translation;
}
Esempio n. 2
0
function loadStructOrINI($filepath)
{
    // convert old files
    if (!isStructFile($filepath)) {
        saveStruct($filepath, loadINI($filepath));
    }
    // load as struct file
    return loadStruct($filepath);
}