diff --git a/PVE/Service/pveproxy.pm b/PVE/Service/pveproxy.pm index b092438a..bb60b29e 100755 --- a/PVE/Service/pveproxy.pm +++ b/PVE/Service/pveproxy.pm @@ -10,6 +10,7 @@ use Encode; use URI; use URI::QueryParam; use Data::Dumper; +use PVE::Cluster; use PVE::API2Tools; use PVE::API2; use PVE::APIServer::Formatter; @@ -176,7 +177,7 @@ sub is_phone { sub get_index { my ($nodename, $server, $r, $args) = @_; - my $lang = 'en'; + my $lang; my $username; my $token = 'null'; @@ -192,6 +193,11 @@ sub get_index { } } + if (!$lang) { + my $dc_conf = PVE::Cluster::cfs_read_file('datacenter.cfg'); + $lang = $dc_conf->{language} // 'en'; + } + $username = '' if !$username; my $mobile = is_phone($r->header('User-Agent')) ? 1 : 0; diff --git a/www/index.html.tpl b/www/index.html.tpl index a972e3aa..ae7f610f 100644 --- a/www/index.html.tpl +++ b/www/index.html.tpl @@ -26,6 +26,7 @@