summaryrefslogtreecommitdiff
path: root/util/vndb.pl
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-09-24 14:07:26 +0200
committerYorhel <git@yorhel.nl>2009-09-24 14:09:43 +0200
commitac3b0e35977653d53cb96854986e8fca2b16ca69 (patch)
treeade184fd454f5be2b16693ebd5e38a6a6f55fc06 /util/vndb.pl
parentdefecb123e03d098283d53af02f2c494f90922aa (diff)
parentd1e395e4197c40b7fd26f1b2dcf75a96d4b2b99e (diff)
Merge branch 'beta'2.7
+ updated changelog
Diffstat (limited to 'util/vndb.pl')
-rwxr-xr-xutil/vndb.pl11
1 files changed, 11 insertions, 0 deletions
diff --git a/util/vndb.pl b/util/vndb.pl
index 455a1c23..ed74a92f 100755
--- a/util/vndb.pl
+++ b/util/vndb.pl
@@ -17,6 +17,7 @@ use lib $ROOT.'/lib';
use YAWF ':html';
+use VNDB::L10N;
our(%O, %S);
@@ -27,6 +28,10 @@ our(%O, %S);
$S{skins} = readskins();
+# load lang.dat
+VNDB::L10N::loadfile();
+
+
# load settings from global.pl
require $ROOT.'/data/global.pl';
@@ -42,6 +47,12 @@ YAWF::init(
sub reqinit {
my $self = shift;
+
+ $self->{l10n} = VNDB::L10N->get_handle($self->reqParam('l10n') || $self->reqCookie('l10n') || ());
+ my $lang = $self->{l10n}->language_tag();
+ $self->resHeader('Set-Cookie', "l10n=$lang; expires=Sat, 01-Jan-2030 00:00:00 GMT; path=/; domain=$self->{cookie_domain}")
+ if $lang ne ($self->reqCookie('l10n')||'');
+
$self->authInit;
# check for IE6