Download the PHP package aimeos/ai-zend2-i18n without Composer
On this page you can find all versions of the php package aimeos/ai-zend2-i18n. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aimeos/ai-zend2-i18n
More information about aimeos/ai-zend2-i18n
Files in aimeos/ai-zend2-i18n
Package ai-zend2-i18n
Short Description Zend Framework 2 adapter for Aimeos web shops and e-commerce solutions
License LGPL-3.0-or-later
Homepage https://aimeos.org/
Informations about the package ai-zend2-i18n
Aimeos Zend2 I18n adapter
The Aimeos web shop components can integrate into almost any PHP application and uses the infrastructure of the application for building URLs, caching content, configuration settings, logging messages, session handling, sending e-mails or handling translations.
The ai-zend2-i18n extension integrates the Zend I18n component for translating messages into Aimeos. It's useful if the Aimeos translations should be available in your application.
Table of content
- Installation
- Setup
- License
- Links
Installation
To allow the Aimeos web shop components to retrive translations for the used strings, you have to install the adapter first. As every Aimeos extension, the easiest way is to install it via composer. If you don't have composer installed yet, you can execute this string on the command line to download it:
Add the ai-zend2-i18n extension to the "require" section of your file:
If you don't want to use the latest version, you can also install any release. The list of releases is available at Packagist. Afterwards you only need to execute the composer update command on the command line:
Setup
Now add the Zend I18n object to the Aimeos context, which you have to create to get the Aimeos components running:
The object is an instance of the class from the core. The code above would only set up the translation for English but you can also set up several languages at once and pass them in the array to the method.
To speed up retrieving translated strings, you can wrap the translation object into the APC decorator before adding it to the context:
This would use the shared memory of the web server to store and retrieve the strings from there instead of the binary gettext "mo" files.
To overwrite translations by local ones you can furthermore added them on top:
All translations from the second parameter would be used instead of the ones from the gettext files. The format of the translations must be:
License
The Aimeos ai-zend2-i18n extension is licensed under the terms of the LGPLv3 license and is available for free.
Links
All versions of ai-zend2-i18n with dependencies
zendframework/zend-i18n Version ~2.3
zendframework/zend-servicemanager Version ~2.3
composer/installers Version ^1.0
aimeos/aimeos-core Version 2018.10.*