mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
use a single replace with the help of arrays.
This commit is contained in:
parent
d304b7274d
commit
2a3da1e5c8
@ -1251,8 +1251,9 @@ function IncludeLanguageFile( $langfile, $failOnError = true )
|
|||||||
// If english is not selected, we load ENGLISH first - then overwrite with configured language
|
// If english is not selected, we load ENGLISH first - then overwrite with configured language
|
||||||
if ( $LANG != "en" ) {
|
if ( $LANG != "en" ) {
|
||||||
//Fix #56
|
//Fix #56
|
||||||
$langengfile = str_replace( "/".$LANG."/", "/".$LANG_EN."/", $langfile );
|
$arr_LANG = array(sprintf('/%s/', $LANG), sprintf('.%s.', $LANG));
|
||||||
$langengfile = str_replace( ".".$LANG.".", ".".$LANG_EN.".", $langengfile );
|
$arr_LANG_EN = array(sprintf('/%s/', $LANG_EN), sprintf('.%s.', $LANG_EN));
|
||||||
|
$langengfile = str_replace($arr_LANG, $arr_LANG_EN, $langfile);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$langengfile = $langfile;
|
$langengfile = $langfile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user