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") ) {
21 require($smarty_gettext_path."smarty_gettext.php");
22 $smarty->register_block('t','smarty_translate');
24 $vars = $smarty->get_config_vars();
25 $language = $vars['lang'];
27 putenv("LANG=$language");
28 setlocale(LC_ALL, $language);
29 bindtextdomain($domain,"./locale");
33 function smarty_translate($params, $text, &$smarty) {
36 $smarty->register_block('t','smarty_translate');