mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
add form to translated phrase for passing string to otrance
This commit is contained in:
parent
bcd18ef813
commit
2cdad42ff9
|
@ -66,6 +66,11 @@ function getLanguages()
|
||||||
function getMLText($key, $replace = array(), $defaulttext = "", $lang="") { /* {{{ */
|
function getMLText($key, $replace = array(), $defaulttext = "", $lang="") { /* {{{ */
|
||||||
GLOBAL $settings, $LANG, $session;
|
GLOBAL $settings, $LANG, $session;
|
||||||
|
|
||||||
|
$trantext = '';
|
||||||
|
if(0 && $settings->_otrance) {
|
||||||
|
$trantext = '<form style="display: inline-block;" accept-charset="UTF-8" action="http://translate.seeddms.org/connector/index" target="_blank" method="post"><input type="hidden" value="" name="oTranceKeys['.$key.']"><input type="submit" value="submit" class="btn btn-mini"/></form>';
|
||||||
|
}
|
||||||
|
|
||||||
if(!$lang) {
|
if(!$lang) {
|
||||||
if($session)
|
if($session)
|
||||||
$lang = $session->getLanguage();
|
$lang = $session->getLanguage();
|
||||||
|
@ -84,17 +89,12 @@ function getMLText($key, $replace = array(), $defaulttext = "", $lang="") { /* {
|
||||||
} else
|
} else
|
||||||
$tmpText = $LANG[$lang][$key];
|
$tmpText = $LANG[$lang][$key];
|
||||||
|
|
||||||
/*
|
if($settings->_otrance) {
|
||||||
if (!isset($text[$key])) {
|
$_GLOBALS['used_langs'][$key] = $tmpText;
|
||||||
if (!$defaulttext)
|
}
|
||||||
return "Error getting Text: " . $key . " (" . $settings->_language . ")";
|
|
||||||
else
|
|
||||||
$tmpText = $defaulttext;
|
|
||||||
} else
|
|
||||||
$tmpText = $text[$key];
|
|
||||||
*/
|
|
||||||
if (count($replace) == 0)
|
if (count($replace) == 0)
|
||||||
return $tmpText;
|
return $tmpText.$trantext;
|
||||||
|
|
||||||
$keys = array_keys($replace);
|
$keys = array_keys($replace);
|
||||||
foreach ($keys as $key)
|
foreach ($keys as $key)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user