Download the PHP package chipslays/phrase without Composer
On this page you can find all versions of the php package chipslays/phrase. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package phrase
🌐 Phrase
Internationalization library for PHP.
Features
- Translations based on
YAML
files; - Easy addition of new sources files;
- Interpolated translations;
- Pluralization;
Installation
Setup
Locale file: locales/yaml/en_US.yml
Locale file: locales/json/en_US.json
Usage
Create Phrase
instance
Get message
Pass language code for force use.
Interpolation
Pass named arguments to interpolate your translations.
Pluralization
English pluralization phrase:
Russian pluralization phrase:
Merge locale messages (load
, patch
)
Use patch
method if you need to add messages to an already loaded file.
If this locale was not previously loaded, it will simply be loaded.
Use load
method for delete and overwrite all previous messages by locale.
Helpers
Custom locale file (Engine)
Example for YamlEngine
:
License
MIT
All versions of phrase with dependencies
PHP Build Version
Package Version
No informations.
The package chipslays/phrase contains the following files
Loading the files please wait ....