Download the PHP package slick/i18n without Composer
On this page you can find all versions of the php package slick/i18n. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package i18n
Short Description Internationalization and string translation package Slick Framework
License MIT
Homepage https://github.com/slickframework/tempalte
Informations about the package i18n
Slick I18n package
Slick I18n is a simple translation and internationalization package. It depends on Zend/I18n which is a complete translation suite that supports all major formats and includes popular features like plural translations and text domains.
This package is compliant with PSR-2 code standards and PSR-4 autoload standards. It also applies the semantic version 2.0.0 specification.
Install
Via Composer
Usage
Messages file
Create a messages file:
save this file in ./i18n/pt_PT/messages.php
.
Language negotiation and setup
Now lets get our translator:
The code above is using the browser's language to set the locale for our translator object. From now on just use the translation methods on the strings you want to translate.
Message translation
Plural translation
Using in your classes
You can add translation functionality to your classes by using the
TranslateMethods
trait and injecting the translator.
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
Contributing
Please see CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
All versions of i18n with dependencies
zendframework/zend-servicemanager Version ^3.3@dev