Download the PHP package audero/audero-shared-gettext without Composer
On this page you can find all versions of the php package audero/audero-shared-gettext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download audero/audero-shared-gettext
More information about audero/audero-shared-gettext
Files in audero/audero-shared-gettext
Package audero-shared-gettext
Short Description Audero Shared Gettext allows to bypass the problem of translations, loaded via the gettext function, that are cached by Apache.
License CC-BY-NC-4.0
Homepage https://github.com/AurelioDeRosa/Audero-Shared-Gettext/
Informations about the package audero-shared-gettext
Audero Shared Gettext
Audero Shared Gettext is a PHP library that allows you to bypass the problem of the translations, loaded via the gettext function, that are cached by Apache. In fact, once a translation is loaded Apache caches it, so unless you can restart the engine any update to a translation file won't be seen. This is particularly annoying if you work on a shared hosting where you don't have administrator permissions.
Requirements
This library requires PHP version 5.3 or higher.
Download
Download via Composer
You can obtain "Audero Shared Gettext" via Composer adding the following lines to your
composer.json
:
"require": {
"audero/audero-shared-gettext": "1.0.*"
}
And then run the install
command to resolve and download the dependencies:
php composer.phar install
Composer will install the library to your project's vendor/audero
directory.
Download via Git
If you haven't or don't want to use Composer, you can download the library from its repository via Git running the following command:
git clone https://github.com/AurelioDeRosa/Audero-Shared-Gettext.git
Usage
Audero Shared Gettext is very easy to use. However, since
the library uses namespaces and follows the PSR standards, you've to use an
autoloader to dynamically load the classes needed. After that, you have to create an SharedGettext
instance and
call the method you need.
Installed via Composer
If you installed the library using Composer, you can rely on the its autoloader. So, after included the latter, you can use one of the previously cited methods as shown in the following example.
Bypass the cache problem (main usage)
Installed via Git
If you obtained the code via Git, you have to load the library by your own. Before using it, you've to add the path to the library to the PHP include path as shown in the following example.
Delete old translations
License
Audero Shared Gettext is licensed under the CC BY-NC 4.0 ("Creative Commons Attribution NonCommercial 4.0")
Authors
Aurelio De Rosa (Twitter: @AurelioDeRosa)