IMPROVEMENT in cache languages files for plugins
This commit is contained in:
@@ -288,7 +288,12 @@ class Translation extends BaseTranslation
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!file_exists(PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.' . $languageId . '.po')) {
|
if (!file_exists(PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.' . $languageId . '.po')) {
|
||||||
return;
|
if (!file_exists(PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.en.po')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$languageFile = PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.en.po' ;
|
||||||
|
} else {
|
||||||
|
$languageFile = PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.' . $languageId . '.po' ;
|
||||||
}
|
}
|
||||||
$translation = Array ();
|
$translation = Array ();
|
||||||
$translationJS = Array ();
|
$translationJS = Array ();
|
||||||
@@ -304,7 +309,7 @@ class Translation extends BaseTranslation
|
|||||||
foreach ($translations as $key => $row) {
|
foreach ($translations as $key => $row) {
|
||||||
$translation[$key] = $row;
|
$translation[$key] = $row;
|
||||||
}
|
}
|
||||||
$languageFile = PATH_PLUGINS . $plugin . PATH_SEP . 'translations' . PATH_SEP . $plugin . '.' . $languageId . '.po' ;
|
|
||||||
G::LoadSystem( 'i18n_po' );
|
G::LoadSystem( 'i18n_po' );
|
||||||
$POFile = new i18n_PO( $languageFile );
|
$POFile = new i18n_PO( $languageFile );
|
||||||
$POFile->readInit();
|
$POFile->readInit();
|
||||||
|
|||||||
Reference in New Issue
Block a user