Commit efec85caafe44e6820eb862c47a37bf0d112a5df

Authored by Adriano Vieira
1 parent b52c286d
Exists in master and in 1 other branch 3.1

Atualizado "trunk"

- corrigido arquivo de configurações no tratamento de idioma
- library passa a criar o objeto tradutor $oTranslator


git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@234 fecfc0c7-e812-0410-ae72-849f08638ee7
include/config-dist.php
... ... @@ -60,12 +60,6 @@
60 60 $cacic_language = 'en-us';
61 61  
62 62 /*
63   - * CACIC application standard language
64   - * (Language to be viewed when the one above not found)
65   - */
66   - $cacic_language_standard = 'pt-br';
67   -
68   - /*
69 63 * CACIC application theme
70 64 */
71 65 $cacic_theme = 'default';
... ... @@ -79,4 +73,4 @@
79 73 $key = 'CacicBrasil';
80 74 $iv = 'abcdefghijklmnop';
81 75 // -------------------------------------------------------------------------------------------------------
82   -?>
83 76 \ No newline at end of file
  77 +?>
... ...
include/define.php
... ... @@ -111,13 +111,13 @@ defined( 'CACIC' ) or die( 'Acesso restrito (Restricted access)!' );
111 111 if(isset($cacic_language))
112 112 define( 'CACIC_LANGUAGE', $cacic_language );
113 113 else
114   - define( 'CACIC_LANGUAGE', 'pt_br');
  114 + define( 'CACIC_LANGUAGE', 'pt-br');
115 115  
116 116 /*
117 117 * CACIC application standard language
118 118 * (Language to be used if the above one fail)
119 119 */
120   - define( 'CACIC_LANGUAGE_STANDARD', $cacic_language_standard );
  120 + define( 'CACIC_LANGUAGE_STANDARD', 'pt-br' );
121 121  
122 122 /**
123 123 * Atribui CHARSET padrao
... ...
include/library.php
... ... @@ -14,8 +14,21 @@
14 14 Livre(FSF) Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
15 15 */
16 16 //session_start();
17   -require_once('config.php');
18   -//Debug($_SERVER['SCRIPT_FILENAME']);
  17 +define('CACIC',1);
  18 +
  19 +@include_once('config.php');
  20 +require_once('define.php');
  21 +
  22 +if(!include_once( TRANSLATOR_PATH.'/Translator.php'))
  23 + die ("<h1>There is a trouble with phpTranslator package. It isn't found.</h1>");
  24 +
  25 +/*
  26 + * componente (objeto) para realizar traducao
  27 + */
  28 +$oTranslator = new Translator( CACIC_LANGUAGE, CACIC_PATH."/language/", CACIC_LANGUAGE_STANDARD );
  29 +$oTranslator->setURLPath(TRANSLATOR_PATH_URL);
  30 +$oTranslator->setLangFilesInSubDirs(true);
  31 +$oTranslator->initStdLanguages();
19 32  
20 33 // ------------------------------------------------------------------------------------------------
21 34 // Função para exibição de data do script para fins de Debug. Os IP´s são definidos em menu_seg.php
... ...