richarddobron / laravel-fbt
A PHP Internationalization Framework for Laravel Application.
Requires
- php: ^7.2 || ^8.0
- ext-dom: *
- ext-iconv: *
- ext-json: *
- illuminate/contracts: ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- illuminate/support: ~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
- richarddobron/fbt: ^4.2.8
Requires (Dev)
- orchestra/database: ~3.7.0|~3.8.0|^4.0|^5.0|^6.0
- orchestra/testbench: ~3.7.0|~3.8.0|^4.0|^5.0|^6.0
- phpunit/phpunit: ^7.0|^8.0
- spatie/phpunit-snapshot-assertions: ^2.0|^3.0|^4.0
This package is auto-updated.
Last update: 2024-11-03 16:49:04 UTC
README
FBT is an internationalization framework for Laravel Application 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.
Requirements
- Laravel 5.5 or higher
- Composer is required for installation
Installing
$ composer require richarddobron/laravel-fbt
Getting started
Version Guidance
How FBT works
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.
Full documentation
https://github.com/richarddobron/laravel-fbt/tree/main/docs
License
FBT is MIT licensed, as found in the LICENSE file.