Subversion Repositories LCARS

Compare Revisions

Last modification

Ignore whitespace Rev 212 → Rev 213

/branches/live/global.php
50,7 → 50,9
global $languages;
preg_match('/^[^-]{2,3}/', $key, $matches);
$language = $languages[$key];
return isset($language['key']) ? $language['key'] : $matches[0];
return (is_array($language) && isset($language['key'])
? $language['key']
: $matches[0]);
}
 
/**
62,7 → 64,9
{
global $languages;
$language = $languages[$key];
return isset($language['name']) ? $language['name'] : $language;
return (is_array($language) && isset($language['name'])
? $language['name']
: $language);
}
 
require_once 'Zend/Loader/StandardAutoloader.php';
82,6 → 86,10
* using Zend Framework 2.1 Translate
*
* @param string $s
*   String to be translated
* @param string $lang = null
* Target language. The default is the document language
* ($language).
* @return string
*/
function tr ($s, $lang = null)