Download the PHP package intelligenia/behistun without Composer
On this page you can find all versions of the php package intelligenia/behistun. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download intelligenia/behistun
More information about intelligenia/behistun
Files in intelligenia/behistun
Package behistun
Short Description A simple translation manager for your PHP application
License MIT
Informations about the package behistun
behistun
Behistun is a simple PHP translation manager
Requirements
PHP 5.4 and dependencies installed by composer (AdoDB and Twig template system).
Installation
Install from packagist typing:
Configuration
Define the available languages
Load the file init.php file from the behistun package
Load the init.php file in your index.php or init.php file.
Use
Templates
This package relies on the Twig template system so you will have to use the following Twig tag to mark a block of text as translatable:
The id will be used to identify the block of translatable text when dealing with translations. You should set it to value that helps you recognize easily the block it represents.
Compile all source texts from templates
Run this PHP script that will get all the source texts and create a locales/LANGUAGE_CODE/LC_MESSAGES/ directory in the same directory your templates:
For example:
Translation
This locales/LANGUAGE_CODE/LC_MESSAGES/ directory contains two files:
web.source.php
Original association between translatable ids and source texts.
web.translation.php
Where each translation goes. Remember that each translation is identified by the id you used in the translatable tag.
Changing language
License
MIT License.
Authors
- First prototype made by Diego J. Romero López at intelligenia ([email protected])