Code comments only
This commit is contained in:
parent
6c9d6eda56
commit
49730ac24f
@ -143,6 +143,9 @@ class Translate
|
|||||||
* If data for file already loaded, do nothing.
|
* If data for file already loaded, do nothing.
|
||||||
* All data in translation array are stored in UTF-8 format.
|
* All data in translation array are stored in UTF-8 format.
|
||||||
* tab_loaded is completed with $domain key.
|
* tab_loaded is completed with $domain key.
|
||||||
|
* Warning: MAIN_USE_CUSTOM_TRANSLATION is an old deprecated feature. Do not use it. It will revert
|
||||||
|
* rule "we keep first entry found with we keep last entry found" so it is probably not what you want to do.
|
||||||
|
*
|
||||||
* Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache
|
* Value for hash are: 1:Loaded from disk, 2:Not found, 3:Loaded from cache
|
||||||
*
|
*
|
||||||
* @param string $domain File name to load (.lang file). Must be "file" or "file@module" for module language files:
|
* @param string $domain File name to load (.lang file). Must be "file" or "file@module" for module language files:
|
||||||
@ -198,13 +201,14 @@ class Translate
|
|||||||
// Directory of translation files
|
// Directory of translation files
|
||||||
$file_lang = $searchdir.($modulename?'/'.$modulename:'')."/langs/".$langofdir."/".$newdomain.".lang";
|
$file_lang = $searchdir.($modulename?'/'.$modulename:'')."/langs/".$langofdir."/".$newdomain.".lang";
|
||||||
$file_lang_osencoded=dol_osencode($file_lang);
|
$file_lang_osencoded=dol_osencode($file_lang);
|
||||||
|
|
||||||
$filelangexists=is_file($file_lang_osencoded);
|
$filelangexists=is_file($file_lang_osencoded);
|
||||||
|
|
||||||
//dol_syslog('Translate::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' file_lang='.$file_lang." => filelangexists=".$filelangexists);
|
//dol_syslog('Translate::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' file_lang='.$file_lang." => filelangexists=".$filelangexists);
|
||||||
|
|
||||||
if ($filelangexists)
|
if ($filelangexists)
|
||||||
{
|
{
|
||||||
// TODO Move cache read out of loop on dirs
|
// TODO Move cache read out of loop on dirs or at least filelangexists
|
||||||
$found=false;
|
$found=false;
|
||||||
|
|
||||||
// Enable caching of lang file in memory (not by default)
|
// Enable caching of lang file in memory (not by default)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user