mirror of
https://github.com/unraid/webgui.git
synced 2026-05-07 21:01:19 -05:00
Multi-language support
This commit is contained in:
@@ -44,7 +44,7 @@ function _($text, $do=-1) {
|
|||||||
}
|
}
|
||||||
function parse_lang_file($file) {
|
function parse_lang_file($file) {
|
||||||
// parser for translation files, includes some trickery to handle PHP quirks.
|
// parser for translation files, includes some trickery to handle PHP quirks.
|
||||||
return array_safe((array)parse_ini_string(preg_replace(['/^(null|yes|no|true|false|on|off|none)=/mi','/^([^>].*)=(.*)$/m','/^:(.+_(help|plug)):$/m','/^:end$/m'],['$1.=','$1="$2"','_$1_="','"'],escapeQuotes(file_get_contents($file)))));
|
return array_safe((array)parse_ini_string(preg_replace(['/^(null|yes|no|true|false|on|off|none)=/mi','/^([^>].*?)=(.*)$/m','/^:(.+_(help|plug)):$/m','/^:end$/m'],['$1.=','$1="$2"','_$1_="','"'],escapeQuotes(file_get_contents($file)))));
|
||||||
}
|
}
|
||||||
function parse_help_file($file) {
|
function parse_help_file($file) {
|
||||||
// parser for help text files, includes some trickery to handle PHP quirks.
|
// parser for help text files, includes some trickery to handle PHP quirks.
|
||||||
|
|||||||
Reference in New Issue
Block a user