Community Support for OpenDocMan (Deprecated)
Multilanguage? - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Multilanguage? (/thread-630.html)



Multilanguage? - Guest - 07-16-2013

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


Re: Multilanguage? - Stephen - 07-16-2013

Out of the box, no. You (or we) could develop a plug-in that would accomplish what you need.


Re: Multilanguage? - Guest - 07-29-2013

Hello Stephen,

thanks for your answer. i will contact the client in order to clearify their needs.

best regards
steffen


RE: Multilanguage? - rybato - 04-07-2016

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']);