Subversion Repositories LCARS

Compare Revisions

Last modification

Regard whitespace Rev 140 → Rev 141

/trunk/global.php
29,33 → 29,34
/* Specify location of translation tables */
$textDomain = 'de.pointedears';
$baseDir = './LocaleData';
 
if (function_exists('_'))
{
bindtextdomain($textDomain, $baseDir);
 
/* Choose domain */
/* Translation is looking for in ./LocaleData/de/LC_MESSAGES/de.pointedears.mo now */
textdomain($textDomain);
}
else
{
/* TODO: Use Autoloader */
require_once 'Zend\Stdlib\ErrorHandler.php';
require_once 'Zend\I18n\Translator\TextDomain.php';
require_once 'Zend\I18n\Translator\Loader\FileLoaderInterface.php';
require_once 'Zend\I18n\Translator\Loader\Gettext.php';
require_once 'Zend\ServiceManager\ServiceLocatorAwareInterface.php';
require_once 'Zend\ServiceManager\ServiceLocatorInterface.php';
require_once 'Zend\ServiceManager\ServiceManager.php';
require_once 'Zend\ServiceManager\AbstractPluginManager.php';
require_once 'Zend\I18n\Translator\LoaderPluginManager.php';
require_once 'Zend\I18n\Translator\Translator.php';
 
/* Translation is looking for in ./LocaleData/de/LC_MESSAGES/de.pointedears.mo now */
$translator = new Zend\I18n\Translator\Translator();
$type = 'gettext';
$pattern = '%s/LC_MESSAGES/%1$s.pointedears.mo';
$translator->addTranslationFilePattern($type, $baseDir, $pattern, $textDomain);
 
/* TODO: Use Autoloader */
// require_once 'Zend\Stdlib\ErrorHandler.php';
// require_once 'Zend\I18n\Translator\TextDomain.php';
// require_once 'Zend\I18n\Translator\Loader\FileLoaderInterface.php';
// require_once 'Zend\I18n\Translator\Loader\Gettext.php';
// require_once 'Zend\ServiceManager\ServiceLocatorAwareInterface.php';
// require_once 'Zend\ServiceManager\ServiceLocatorInterface.php';
// require_once 'Zend\ServiceManager\ServiceManager.php';
// require_once 'Zend\ServiceManager\AbstractPluginManager.php';
// require_once 'Zend\I18n\Translator\LoaderPluginManager.php';
// require_once 'Zend\I18n\Translator\Translator.php';
//
// use Zend\I18n\Translator\Translator;
// $translator = new Translator();
// $type = 'gettext';
// $pattern = '%s/LC_MESSAGES/%1$s.pointedears.mo';
// $translator->addTranslationFilePattern($type, $baseDir, $pattern, $textDomain);
 
if (!function_exists('_'))
{
function _($s)
{
global $translator;
62,9 → 63,14
global $textDomain;
global $language;
if ($translator)
{
return $translator->translate($s, $textDomain, $language);
}
 
return $s;
}
}
 
$menu = array(
'scripts' => array('path' => 'scripts/', 'text' => 'Scripting'),