From df2c751037905ebe4e63b87d6d4e68a09bc32e39 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 15 Aug 2015 12:18:14 +0000 Subject: [PATCH] set installation lang from ucr locale/default, as cloud-config at least never has anything but EN set in enviroment --- doc/rpm-build/post_install.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/rpm-build/post_install.php b/doc/rpm-build/post_install.php index 85c0605004..2ca6234bc8 100755 --- a/doc/rpm-build/post_install.php +++ b/doc/rpm-build/post_install.php @@ -612,6 +612,14 @@ function set_univention_defaults() set_distro_defaults('debian'); $config['distro'] = 'univention'; + // set lang from ucr locale, as cloud-config at least never has anything but EN set in enviroment + @list($lang,$nat) = preg_split('/[_.]/', _ucr_get('locale/default')); + if (in_array($lang.'-'.strtolower($nat),array('es-es','pt-br','zh-tw'))) + { + $lang .= '-'.strtolower($nat); + } + $config['lang'] = $lang; + // mysql settings $config['db_root_pw'] = _ucr_secret('mysql');