Download the PHP package jdz/language without Composer
On this page you can find all versions of the php package jdz/language. 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 language
Language
Language
is a proxy I use to symfony/translation
component is a modular PHP package designed for managing and translating multilingual content in your web projects. This project simplifies the use of language files and provides a clear API for easily handling translations.
Features
- Built on the symfony/translation component for robust translation capabilities.
- Uses the symfony/string inflector for pluralize and singularize.
- Load default or application-specific language files.
- Flexible management of translation keys.
- Support for YAML format language files.
- Easy integration with other frameworks or custom solutions.
- Optimized for fast performance and maximum extensibility.
- Inflector for French, English & soon Spanish -> introduced in symfony/string 7.2 (PHP >= 8.2).
Installation
Add the package to your project using Composer:
Usage
For a complete example, check the example
folder in the repository.
Initialization
php $language->load('fr'); yaml welcome_message: "Welcome" goodbye_message: "Goodbye"
### Setting Values
### Getting Values
## Methods
| Method | Description |
|-------------------|-------------|
| `load()` | Load a user language. |
| `loadYamlFiles()` | Load translations from an array of YAML files. |
| `loadYamlFile()` | Load translations from a YAML file. |
| `loadArray()` | Load translations from an array of key => value pairs. |
| `set()` | Adds a translation. |
| `get()` | Retrieves a translation at the specified path. |
| `has()` | Checks if a translation exists at the specified path. |
| `plural()` | Load a plural. |
| `pluralize()` | Uses the symfony/string inflector. |
| `pluralize()` | Uses the symfony/string inflector. |
## License
This project is licensed under the MIT License. See the LICENSE file for details.
## Author
(c) Joffrey Demetz <[email protected]>
All versions of language with dependencies
PHP Build Version
Package Version
The package jdz/language contains the following files
Loading the files please wait ....