3 +-------------------------------------------------------------------------+
4 | Copyright (C) 2004-2005 Juan Luis Frances Jiminez |
6 | This program is free software; you can redistribute it and/or |
7 | modify it under the terms of the GNU General Public License |
8 | as published by the Free Software Foundation; either version 2 |
9 | of the License, or (at your option) any later version. |
11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. |
15 +-------------------------------------------------------------------------+
17 // begin Gettext initialization
18 // and we check if it is present at the system
20 if ( function_exists("gettext") ) {
23 require($smarty_gettext_path."smarty_gettext.php");
24 $smarty->register_block('t','smarty_translate');
26 //$vars = $smarty->get_config_vars();
27 $language = $dbSql->get_config_param("lang");
29 putenv("LANG=$language");
30 setlocale(LC_ALL, $language);
31 bindtextdomain($domain,"./locale");
35 function smarty_translate($params, $text, &$smarty) {
38 $smarty->register_block('t','smarty_translate');