Allow per-language custom lang files

This commit is contained in:
Jamie Cameron 2011-01-14 14:48:15 -08:00
parent b7936639ba
commit 08b9f5f1ee
2 changed files with 10 additions and 0 deletions

View File

@ -139,3 +139,4 @@ Sped up the loading of language files by pre-caching them in memory when Webmin
Added support for Pardus Linux, thanks to Kaan Ozdincer.
Major Dutch updates, thanks to Gandyman.
Majoe French translation update, thanks to ButterflyOfFire.
Allow per-language language overrides to be defined, in custom-lang-$code files.

View File

@ -4443,6 +4443,10 @@ if ($ol) {
}
}
&read_file_cached("$config_directory/custom-lang", \%text);
foreach my $o (@lang_order_list) {
next if ($o eq "en");
&read_file_cached("$config_directory/custom-lang-$o", \%text);
}
my $norefs = $text{'__norefs'};
if ($_[0]) {
@ -4458,6 +4462,11 @@ if ($_[0]) {
}
}
&read_file_cached("$config_directory/$_[0]/custom-lang", \%text);
foreach my $o (@lang_order_list) {
next if ($o eq "en");
&read_file_cached("$config_directory/$_[0]/custom-lang-$o",
\%text);
}
$norefs = $text{'__norefs'} if ($norefs);
}