Commit fdc5e0e9ba91c6efb6d9fe3cd1ee5dbc732b5650
1 parent
18783e71
Exists in
master
and in
1 other branch
Atualização do "trunk"
- atualizados arquivos de idiomas - criadas funções para obter arquivos de definições de idiomas git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@253 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
4 changed files
with
58 additions
and
5 deletions
Show diff stats
include/library.php
... | ... | @@ -30,6 +30,56 @@ $oTranslator->setURLPath(TRANSLATOR_PATH_URL); |
30 | 30 | $oTranslator->setLangFilesInSubDirs(true); |
31 | 31 | $oTranslator->initStdLanguages(); |
32 | 32 | |
33 | + | |
34 | +/* | |
35 | + * Retorna a extensão de um arquivo qualquer. | |
36 | + */ | |
37 | +function findexts($filename) { | |
38 | + $filename = strtolower($filename) ; | |
39 | + $exts = split("[/\\.]", $filename) ; | |
40 | + $n = count($exts)-1; | |
41 | + $exts = $exts[$n]; | |
42 | + return $exts; | |
43 | +} | |
44 | + | |
45 | +/** | |
46 | + * Le o diretorio de idiomas em busca dos arquivos de configuracao das traducoes | |
47 | + * | |
48 | + * @return array Matriz de dados de cada idioma no qual o CACIC for traduzido. | |
49 | + * | |
50 | + * Formato da matriz: | |
51 | + * $language_set = array( 'pt_BR' => ('descr' => 'Português Brasileiro', | |
52 | + * 'charset' => 'iso-8859-1', | |
53 | + * 'directition => '0', // 0=direita, 1=esquerda | |
54 | + * 'versao' => '0.1', | |
55 | + * 'versao_cacic' => '2.4.0' | |
56 | + * ) | |
57 | + * ) | |
58 | + */ | |
59 | +function getLanguages() { | |
60 | + $_path = CACIC_PATH.CACIC_LANGUAGE_PATH; | |
61 | + $_dir = dir($_path); | |
62 | + $_lang = array(); | |
63 | + while (false !== ($_valor = $_dir->read())) { | |
64 | + if(is_file($_dir->path.$_valor)) | |
65 | + if(findexts($_valor) === 'php' ) { | |
66 | + $_file_name = $_valor; | |
67 | + @require_once($_dir->path.$_file_name); | |
68 | + $_lang = array_merge($_lang, array($language_abbr => array('abbr' => $language_abbr, | |
69 | + 'descr' => $language_def, | |
70 | + 'charset' => $language_charset, | |
71 | + 'direction' => $language_direction, | |
72 | + 'version' => $language_version, | |
73 | + 'version_cacic' => $language_cacic_version | |
74 | + ) ) ); | |
75 | + } | |
76 | + } | |
77 | + $_dir->close(); | |
78 | + | |
79 | + return $_lang; | |
80 | + | |
81 | +} // end func: getLanguages | |
82 | + | |
33 | 83 | // ------------------------------------------------------------------------------------------------ |
34 | 84 | // Função para exibição de data do script para fins de Debug. Os IP´s são definidos em menu_seg.php |
35 | 85 | // Novas informações poderão ser acrescentadas futuramente... | ... | ... |
instalador/index.php
... | ... | @@ -40,7 +40,11 @@ |
40 | 40 | } |
41 | 41 | |
42 | 42 | if(!@include_once( TRANSLATOR_PATH.'/Translator.php')) |
43 | - die ("<h1>There is a trouble with phpTranslator package. It isn't found.</h1>"); | |
43 | + die ("<h1>There is a trouble with phpTranslator package. It isn't found.</h1>"); | |
44 | + | |
45 | + // Conjunto de idiomas para os quais o CACIC está traduzido | |
46 | + $_SESSION['language_set'] = getLanguages(); | |
47 | + | |
44 | 48 | |
45 | 49 | if(!empty($_POST['translate_lang'])) |
46 | 50 | $_SESSION['cacic_language'] = $_POST['translate_lang']; | ... | ... |
language/en_US/language.en_US.inc.php
... | ... | @@ -15,7 +15,6 @@ en_US kciq_msg aceitar |
15 | 15 | en_US kciq_msg aceito instalador I accept this license |
16 | 16 | en_US kciq_msg previous instalador Back |
17 | 17 | en_US kciq_msg def_language instaladorinfo Language |
18 | -en_US instalador InstaladorTagHeader Installer | |
19 | 18 | en_US kciq_installertitle instaladorinfo CACIC Web Installer |
20 | 19 | en_US kciq_msg web_installer instaladorinfo CACIC Web Installer |
21 | 20 | en_US kciq_installerintrotitle instaladorinfo Introdution | ... | ... |
language/pt_BR/language.pt_BR.inc.php
... | ... | @@ -9,13 +9,13 @@ pt_BR geral |
9 | 9 | pt_BR language Geral info Idioma |
10 | 10 | pt_BR kciq_msg def_language instaladorinfo Idioma |
11 | 11 | pt_BR kciq_mnt_lang traducao Manutençãoinfo Idioma a traduzir |
12 | -pt_BR instalador InstaladorTagHeader Instalador | |
12 | +pt_BR instalador geral TagHeader Instalador | |
13 | 13 | pt_BR kciq_installertitle instaladorinfo Instalador WEB para o CACIC |
14 | 14 | pt_BR kciq_msg web_installer instaladorinfo Instalador WEB para o CACIC |
15 | 15 | pt_BR kciq_installerintrotitle instaladorinfo Introdução |
16 | 16 | pt_BR kciq_msg login Geral info Login |
17 | 17 | pt_BR kciq_msg logout Geral info Logoff |
18 | -pt_BR manutenção ManutençãoTagHeader Manutenção | |
18 | +pt_BR manutenção geral TagHeader Manutenção | |
19 | 19 | pt_BR kciq_msg mensagem Geral Mensagem |
20 | 20 | pt_BR kciq_msg js_enable instaladorinfo Necessário ativar <b>JavaScript</b> para usar o Instalador Web |
21 | 21 | pt_BR kciq_msg access level Geral info Nível de acesso |
... | ... | @@ -24,8 +24,8 @@ pt_BR kciq_menu search |
24 | 24 | pt_BR language_pt_br Geral info pt_BR Português Brasileiro |
25 | 25 | pt_BR kciq_msg next Geral info Próximo |
26 | 26 | pt_BR kciq_installerresources instaladorinfo Recursos do Instalador: |
27 | +pt_BR kciq_msg password Geral info Senha | |
27 | 28 | pt_BR kciq_mnt_tradutor Manutençãoinfo Tradução de texto do CACIC |
28 | 29 | pt_BR kciq_msg user Geral info Usuário |
29 | 30 | pt_BR kciq_msg def_version instaladorinfo Versão |
30 | 31 | pt_BR kciq_installer_introdution instaladorarquivo introducao.html |
31 | -pt_BR kciq_msg password Geral info Senha | ... | ... |