mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
Changed loading of language files, now english files are loaded first.
If another language is configured, the translation is loaded after the english language files. By using this method, you are able to use older translations with newer phpLogCon versions, without having display issues. Strings which are not translated are just shown in english.
This commit is contained in:
parent
6d21099ce0
commit
9cbe8a39c5
@ -712,7 +712,10 @@ class LogStreamPDO extends LogStream {
|
||||
return ERROR_DB_QUERYFAILED;
|
||||
|
||||
if ( $this->_myDBQuery->rowCount() == 0 )
|
||||
{
|
||||
$this->_myDBQuery = null;
|
||||
return ERROR_NOMORERECORDS;
|
||||
}
|
||||
|
||||
// Initialize Array variable
|
||||
$aResult = array();
|
||||
@ -728,6 +731,9 @@ class LogStreamPDO extends LogStream {
|
||||
}
|
||||
}
|
||||
|
||||
// Delete handle
|
||||
$this->_myDBQuery = null;
|
||||
|
||||
// return finished array
|
||||
if ( count($aResult) > 0 )
|
||||
return $aResult;
|
||||
|
@ -1031,12 +1031,23 @@ function IncludeLanguageFile( $langfile )
|
||||
{
|
||||
global $LANG, $LANG_EN;
|
||||
|
||||
if ( file_exists( $langfile ) )
|
||||
include( $langfile );
|
||||
// If english is not selected, we load ENGLISH first - then overwrite with configured language
|
||||
if ( $LANG != "en" )
|
||||
$langengfile = str_replace( $LANG, $LANG_EN, $langfile );
|
||||
else
|
||||
$langengfile = $langfile;
|
||||
if ( file_exists($langengfile) )
|
||||
include( $langengfile );
|
||||
else
|
||||
DieWithErrorMsg( "FATAL Error initialzing sublanguage system. Please make sure that all files have been uploaded correctly." );
|
||||
|
||||
// If nto english, load the additional translations
|
||||
if ( $LANG != "en" )
|
||||
{
|
||||
$langfile = str_replace( $LANG, $LANG_EN, $langfile );
|
||||
include( $langfile );
|
||||
if ( file_exists( $langfile ) )
|
||||
include( $langfile );
|
||||
else
|
||||
OutputDebugMessage("FATAL Error reading the configured language $LANG. Please make sure that all files have been uploaded correctly.", DEBUG_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user