39,7 → 39,6 |
) |
); |
|
|
/** |
* Returns the short language key. |
* |
50,7 → 49,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 → 63,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 → 85,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) |
Property changes: |
Added: svn:mergeinfo |
## -0,0 +0,1 ## |
Merged /branches/live/global.php:r198-213 |