Commit 0b720333231b2e340c1c08595c35366f4c1df1d9
1 parent
b39a931c
Exists in
master
and in
1 other branch
arrumando o esquema de traducao, desculpa Adriano2
git-svn-id: http://svn.softwarepublico.gov.br/svn/cacic/cacic/trunk/gerente@441 fecfc0c7-e812-0410-ae72-849f08638ee7
Showing
1 changed file
with
22 additions
and
0 deletions
Show diff stats
include/library.php
... | ... | @@ -222,6 +222,28 @@ function Debug($p_ScriptFileName) |
222 | 222 | } |
223 | 223 | } |
224 | 224 | } |
225 | + | |
226 | +/** | |
227 | + * Menu a ser apresentado ao usuario conforme o idioma selecionado | |
228 | + * | |
229 | + * @param string $_menu_name Nome do menu a ser pesquisado | |
230 | + * @return string Caminho do menu | |
231 | + */ | |
232 | +function getMenu($_menu_name) { | |
233 | + $_file_lang = 'language'.DIRECTORY_SEPARATOR.CACIC_LANGUAGE.DIRECTORY_SEPARATOR.$_menu_name; | |
234 | + if(is_file($_file_lang) and is_readable($_file_lang)) { | |
235 | + return $_file_lang; | |
236 | + } | |
237 | + else { | |
238 | + $_file_lang = 'language'.DIRECTORY_SEPARATOR.CACIC_LANGUAGE_STANDARD.DIRECTORY_SEPARATOR.$_menu_name; | |
239 | + if(is_file($_file_lang) and is_readable($_file_lang)) { | |
240 | + return $_file_lang; | |
241 | + } | |
242 | + else return "Erro no menu (Menu error)!".$_file_lang; | |
243 | + } | |
244 | +} | |
245 | + | |
246 | + | |
225 | 247 | // __________________________________________________________________ |
226 | 248 | // Apenas uma alternativa mais completa à função "stripos" do PHP5... |
227 | 249 | // __________________________________________________________________ | ... | ... |