Conditions | 5 |
Paths | 6 |
Total Lines | 23 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
51 | public function get( array $languageIds ) : array |
||
52 | { |
||
53 | $i18nPaths = $this->aimeos->get()->getI18nPaths(); |
||
54 | |||
55 | foreach( $languageIds as $langid ) |
||
56 | { |
||
57 | if( !isset( $this->i18n[$langid] ) ) |
||
58 | { |
||
59 | $i18n = new \Aimeos\Base\Translation\Gettext( $i18nPaths, $langid ); |
||
60 | |||
61 | if( $this->config->get( 'shop.apc_enabled', false ) == true ) { |
||
62 | $i18n = new \Aimeos\Base\Translation\Decorator\APC( $i18n, $this->config->get( 'shop.apc_prefix', 'laravel:' ) ); |
||
63 | } |
||
64 | |||
65 | if( $this->config->has( 'shop.i18n.' . $langid ) ) { |
||
66 | $i18n = new \Aimeos\Base\Translation\Decorator\Memory( $i18n, $this->config->get( 'shop.i18n.' . $langid ) ); |
||
67 | } |
||
68 | |||
69 | $this->i18n[$langid] = $i18n; |
||
70 | } |
||
71 | } |
||
72 | |||
73 | return $this->i18n; |
||
74 | } |
||
75 | } |