diff --git a/src/include/functions_common.php b/src/include/functions_common.php index 4c50d76..6576f99 100644 --- a/src/include/functions_common.php +++ b/src/include/functions_common.php @@ -1251,8 +1251,9 @@ function IncludeLanguageFile( $langfile, $failOnError = true ) // If english is not selected, we load ENGLISH first - then overwrite with configured language if ( $LANG != "en" ) { //Fix #56 - $langengfile = str_replace( "/".$LANG."/", "/".$LANG_EN."/", $langfile ); - $langengfile = str_replace( ".".$LANG.".", ".".$LANG_EN.".", $langengfile ); + $arr_LANG = array(sprintf('/%s/', $LANG), sprintf('.%s.', $LANG)); + $arr_LANG_EN = array(sprintf('/%s/', $LANG_EN), sprintf('.%s.', $LANG_EN)); + $langengfile = str_replace($arr_LANG, $arr_LANG_EN, $langfile); } else $langengfile = $langfile;