Conditions | 6 |
Paths | 6 |
Total Lines | 24 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
44 | public function get( array $languageIds ) : array |
||
45 | { |
||
46 | $config = $this->container->get( 'aimeos.config' )->get(); |
||
47 | $i18nPaths = $this->container->get( 'aimeos' )->getI18nPaths(); |
||
48 | |||
49 | foreach( $languageIds as $langid ) |
||
50 | { |
||
51 | if( !isset( $this->i18n[$langid] ) ) |
||
52 | { |
||
53 | $i18n = new \Aimeos\MW\Translation\Gettext( $i18nPaths, $langid ); |
||
54 | |||
55 | if( function_exists( 'apcu_store' ) === true && $config->get( 'apc_enabled', false ) == true ) { |
||
56 | $i18n = new \Aimeos\MW\Translation\Decorator\APC( $i18n, $config->get( 'apc_prefix', 'slim:' ) ); |
||
57 | } |
||
58 | |||
59 | if( ( $cfg = $config->get( 'i18n/' . $langid, array() ) ) !== array() ) { |
||
60 | $i18n = new \Aimeos\MW\Translation\Decorator\Memory( $i18n, $cfg ); |
||
61 | } |
||
62 | |||
63 | $this->i18n[$langid] = $i18n; |
||
64 | } |
||
65 | } |
||
66 | |||
67 | return $this->i18n; |
||
68 | } |
||
69 | } |