From ab2d400b2bb53bd152d648ecfab27eee6e8865e9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sun, 2 Feb 2014 16:32:39 +0000 Subject: [PATCH] language selection for self service --- lam/help/help.inc | 2 ++ lam/lib/selfService.inc | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lam/help/help.inc b/lam/help/help.inc index ac3eb8bc..8c242953 100644 --- a/lam/help/help.inc +++ b/lam/help/help.inc @@ -100,6 +100,8 @@ $helpArray = array ( "Text" => _("This defines the language of the login window and sets this language as the default language. Users can change the language at login.")), "210" => array ("Headline" => _("Script path"), "Text" => _("This is the absolute path to an external script for setting quotas and creating home directories.")), + "211" => array ("Headline" => _("Enforce language"), + "Text" => _("If enabled then the default language will be enforced and cannot be chosen by the user.")), "212" => array ("Headline" => _("Change password"), "Text" => _("If you want to change the current preferences password, please enter it here.")), "214" => array ("Headline" => _("Cache timeout"), diff --git a/lam/lib/selfService.inc b/lam/lib/selfService.inc index bcf895dd..b6b96c0b 100644 --- a/lam/lib/selfService.inc +++ b/lam/lib/selfService.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2006 - 2013 Roland Gruber + Copyright (C) 2006 - 2014 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -357,6 +357,11 @@ class selfServiceProfile { /** configuration settings of modules */ public $moduleSettings; + + /** language for self service */ + public $language = 'en_GB.utf8'; + /** disallow user to change language */ + public $enforceLanguage = false; /** * Constructor @@ -391,6 +396,8 @@ class selfServiceProfile { $this->readOnlyFields = array(); $this->relabelFields = array(); $this->moduleSettings = array(); + $this->language = 'en_GB.utf8'; + $this->enforceLanguage = true; } }