From 4b5995ea94a1084c9f3034900f7e3fd3b156c91c Mon Sep 17 00:00:00 2001 From: bergware Date: Tue, 31 Mar 2020 02:46:48 +0200 Subject: [PATCH] Multi-language support --- plugins/dynamix/include/Translations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dynamix/include/Translations.php b/plugins/dynamix/include/Translations.php index 70aa96420..50901d143 100644 --- a/plugins/dynamix/include/Translations.php +++ b/plugins/dynamix/include/Translations.php @@ -21,7 +21,7 @@ function _($text) { return strpos($data,'*')===false ? $data : preg_replace(['/\*\*(.+?)\*\*/','/\*(.+?)\*/'],['$1','$1'],$data); } function parse_lang_file($file) { - return array_filter(parse_ini_string(preg_replace(['/^(null|yes|no|true|false|on|off|none)=/mi','/^([^>].*)=([^"\'`].*)$/m','/^:((help|plug)\d*)$/m','/^:end$/m'],['$1.=','$1="$2"',"_$1_=\"",'"'],preg_replace('/^(.+?)=(.+?)$/m','$1="$2"',str_replace(['"',"'","=\n"],[""","'","=\"\"\n"],file_get_contents($file))))),'secured',ARRAY_FILTER_USE_BOTH); + return array_filter(parse_ini_string(preg_replace(['/^(null|yes|no|true|false|on|off|none)=/mi','/^([^>].*)=([^"\'`].*)$/m','/^:((help|plug)\d*)$/m','/^:end$/m'],['$1.=','$1="$2"',"_$1_=\"",'"'],str_replace(['"',"'","=\n"],[""","'","=\"\"\n"],file_get_contents($file)))),'secured',ARRAY_FILTER_USE_BOTH); } function parse_text($text) { return preg_replace_callback('/_\((.+?)\)_/m',function($m){return _($m[1]);},preg_replace(["/^:((help|plug)\d*)$/m","/^:end$/m"],["",""],$text));