Revision 79dea6ab
Von Sven Schöling vor mehr als 9 Jahren hinzugefügt
SL/Locale.pm | ||
---|---|---|
80 | 80 |
$self->{countrycode} = $country; |
81 | 81 |
|
82 | 82 |
if ($country && -d "locale/$country") { |
83 |
local *IN;
|
|
84 |
if (open(IN, "<", "locale/$country/all")) {
|
|
85 |
my $code = join("", <IN>);
|
|
83 |
if (open my $in, "<", "locale/$country/all") {
|
|
84 |
local $/ = undef;
|
|
85 |
my $code = <$in>;
|
|
86 | 86 |
eval($code); |
87 |
close(IN); |
|
87 |
close($in); |
|
88 |
} |
|
89 |
|
|
90 |
if (-d "locale/$country/more") { |
|
91 |
opendir my $dh, "locale/$country/more" or die "can't open locale/$country/more: $!"; |
|
92 |
my @files = sort grep -f "locale/$country/more/$_", readdir $dh; |
|
93 |
close $dh; |
|
94 |
|
|
95 |
for my $file (@files) { |
|
96 |
if (open my $in, "<", "locale/$country/more/$file") { |
|
97 |
local $/ = undef; |
|
98 |
my $code = <$file>; |
|
99 |
eval($code); |
|
100 |
close($in); |
|
101 |
$self->{texts}{$_} = $self->{more_texts}{$_} for keys %{ $self->{more_texts} }; |
|
102 |
} |
|
103 |
} |
|
88 | 104 |
} |
89 | 105 |
} |
90 | 106 |
|
Auch abrufbar als: Unified diff
Locale: zusätzliche Locales parsen