Hello everyone,
we installed the recent opendocman 1.2.6.7 and are searching for a feature - individual language per user ? is this possible ? if yes - how ?
thanks in advance.
steffen
Out of the box, no. You (or we) could develop a plug-in that would accomplish what you need.
Hello Stephen,
thanks for your answer. i will contact the client in order to clearify their needs.
best regards
steffen
Hi,
I used very simple workaround which allows you to set language per user directly in the database (no web interface for changing user language)
1. Execute following query on the database:
Code:
ALTER TABLE `odm_user` ADD `user_language` VARCHAR(15) NOT NULL DEFAULT 'english' COMMENT 'Language of the application per user' ;
2. Set user_language in the odm_user table
3. Add following code to functions.php line 49 (before include_once('includes/language/' . $GLOBALS['CONFIG']['language'] . '.php'); ):
PHP Code:
if (isset($_SESSION['uid'])) {
$query = "SELECT user_language FROM {$GLOBALS['CONFIG']['db_prefix']}user WHERE id ='".$_SESSION['uid']."'";
$stmt = $pdo->prepare($query);
$stmt->execute();
$result = $stmt->fetchAll(); //print_r($result);
$GLOBALS['CONFIG']['language'] = $result[0]["user_language"]; //print_r($GLOBALS['CONFIG']);
}