Skip to content

Commit 2deda50

Browse files
committed
feat: Add i18n for html skin
1 parent d0fe20f commit 2deda50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

inc-func.cgi

+6
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ sub SetSkin
123123
open(IN,"<:encoding(UTF-8)",$skinfile.'.html');
124124
read(IN,my $SKIN,-s $skinfile.'.html');
125125
close(IN);
126+
# Add i18n for html skin;
127+
while ($SKIN =~ m/l\('(.*?)'\)/g) {
128+
my $target = $1;
129+
my $replace = l($1);
130+
$SKIN =~ s/l\('$target'\)/$replace/g;
131+
}
126132
%DISP={};
127133
($DISP{TOP},$DISP{MENU},$DISP{BOTTOM})=split(/<!--SKINPAUSE-->/, $SKIN);
128134
}

0 commit comments

Comments
 (0)