mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add array for holding missing translations
This commit is contained in:
parent
84da6f7e58
commit
84f3942fba
|
@ -19,6 +19,7 @@
|
|||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$LANG = array();
|
||||
$MISSING_LANG = array();
|
||||
foreach(getLanguages() as $_lang) {
|
||||
if(file_exists($settings->_rootDir . "languages/" . $_lang . "/lang.inc")) {
|
||||
include $settings->_rootDir . "languages/" . $_lang . "/lang.inc";
|
||||
|
@ -64,7 +65,7 @@ function getLanguages()
|
|||
* @param string $lang use this language instead of the currently set lang
|
||||
*/
|
||||
function getMLText($key, $replace = array(), $defaulttext = "", $lang="") { /* {{{ */
|
||||
GLOBAL $settings, $LANG, $session;
|
||||
GLOBAL $settings, $LANG, $session, $MISSING_LANG;
|
||||
|
||||
if(!$lang) {
|
||||
if($session)
|
||||
|
@ -75,10 +76,12 @@ function getMLText($key, $replace = array(), $defaulttext = "", $lang="") { /* {
|
|||
|
||||
if(!isset($LANG[$lang][$key]) || !$LANG[$lang][$key]) {
|
||||
if (!$defaulttext) {
|
||||
if(isset($LANG[$settings->_language][$key]))
|
||||
$MISSING_LANG[$key] = $lang; //$_SERVER['SCRIPT_NAME'];
|
||||
if(!empty($LANG[$settings->_language][$key])) {
|
||||
$tmpText = $LANG[$settings->_language][$key];
|
||||
else
|
||||
$tmpText = '';
|
||||
} else {
|
||||
$tmpText = '**'.$key.'**';
|
||||
}
|
||||
} else
|
||||
$tmpText = $defaulttext;
|
||||
} else
|
||||
|
|
Loading…
Reference in New Issue
Block a user