Rev 154 | Rev 170 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 154 | Rev 156 | ||
---|---|---|---|
Line 5... | Line 5... | ||
5 | 5 | ||
6 | $modi = max(array( |
6 | $modi = max(array( |
7 | @filemtime(__FILE__), |
7 | @filemtime(__FILE__), |
8 | @filemtime('LocaleData'), |
8 | @filemtime('LocaleData'), |
9 | @filemtime('index.phtml'), |
9 | @filemtime('index.phtml'), |
- | 10 | @filemtime('footer.phtml'), |
|
10 | @filemtime('styles/lcars-basic.css'), |
11 | @filemtime('styles/lcars-basic.css'), |
11 | @filemtime('styles/lcars22.css'), |
12 | @filemtime('styles/lcars22.css'), |
12 | @filemtime('styles/lcars-ani.css'), |
13 | @filemtime('styles/lcars-ani.css'), |
13 | @filemtime('scripts/object.js'), |
14 | @filemtime('scripts/object.js'), |
14 | )); |
15 | )); |
Line 24... | Line 25... | ||
24 | $languages = array( |
25 | $languages = array( |
25 | 'en' => 'English', |
26 | 'en' => 'English', |
26 | 'de' => 'Deutsch' |
27 | 'de' => 'Deutsch' |
27 | ); |
28 | ); |
28 | 29 | ||
29 | /* TODO: Use Autoloader */
|
- | |
30 | require_once 'Zend/Loader/StandardAutoloader.php'; |
30 | require_once 'Zend/Loader/StandardAutoloader.php'; |
31 | $loader = new Zend\Loader\StandardAutoloader(array('autoregister_zf' => true)); |
31 | $loader = new Zend\Loader\StandardAutoloader(array('autoregister_zf' => true)); |
32 | $loader->register(); |
32 | $loader->register(); |
33 | 33 | ||
34 | $translator = new Zend\I18n\Translator\Translator(); |
34 | $translator = new Zend\I18n\Translator\Translator(); |
Line 40... | Line 40... | ||
40 | $translator->addTranslationFilePattern($type, $baseDir, $pattern, $textDomain); |
40 | $translator->addTranslationFilePattern($type, $baseDir, $pattern, $textDomain); |
41 | 41 | ||
42 | /**
|
42 | /**
|
43 | * Returns the translation of the parameter, if any,
|
43 | * Returns the translation of the parameter, if any,
|
44 | * using Zend Framework 2.1 Translate
|
44 | * using Zend Framework 2.1 Translate
|
- | 45 | *
|
|
45 | * @param string $s
|
46 | * @param string $s
|
46 | * @return string
|
47 | * @return string
|
47 | */
|
48 | */
|
48 | function tr ($s) |
49 | function tr ($s) |
49 | {
|
50 | {
|
50 | global $translator; |
51 | global $translator; |
51 | global $textDomain; |
52 | global $textDomain; |
52 | global $language; |
53 | global $language; |
53 | 54 | ||
54 | if ($translator) |
- | |
55 | {
|
- | |
56 | return $translator->translate($s, $textDomain, $language); |
55 | return $translator->translate($s, $textDomain, $language); |
57 | }
|
56 | }
|
58 | 57 | ||
59 | return $s; |
- | |
60 | }
|
- | |
61 | - | ||
62 | $menu = array( |
58 | $menu = array( |
63 | 'scripts' => array('path' => 'scripts/', 'text' => 'Scripting'), |
59 | 'scripts' => array('path' => 'scripts/', 'text' => 'Scripting'), |
64 | 'es-matrix' => array( |
60 | 'es-matrix' => array( |
65 | 'path' => 'es-matrix', |
61 | 'path' => 'es-matrix', |
66 | 'text' => 'ES Matrix', |
62 | 'text' => 'ES Matrix', |