FBT is an internationalization framework for PHP designed to be not just powerful and flexible, but also simple and intuitive. It helps with the following:
- Organizing your source text for translation
- Composing grammatically correct translatable UI
- Eliminating verbose boilerplate for generating UI
This library is based on the JavaScript implementation of Facebook's FBT.
- PHP 7.0 or higher
- Composer is required for installation
$ composer require richarddobron/fbt:^4
- Parameters and interpolation
- Implicit parameters
- Auto-parameterization
- Plurals
- Enumerations
- Pronouns
- Number formatting
- Phrase extracting
- Inline translating
Version | Released | Status | Repo | PHP Version |
---|---|---|---|---|
3.x | 2022-02-18 | Maintained | v3 | >= 7.0 |
4.x | 2022-04-09 | Latest | v4 | >= 7.2 |
The following integrations are fully supported and maintained:
FBT works by transforming your <fbt>
and fbt(...)
constructs via
Simple HTML DOM Parser. This library serve to extract strings from source and
lookup translated payloads generated while execution. FBT creates tables
of all possible variations for the given fbt phrase and accesses this
at runtime.
https://github.com/richardDobron/fbt/tree/main/docs
- Add driver-agnostic support for multiple database systems.
- Add integrations for Symfony, CakePHP, Zend Framework, ...
- ...
FBT is MIT licensed, as found in the LICENSE file.