nimah79 / f3-gettext
Gettext Plugin for PHP Fat-Free Framework
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/nimah79/f3-gettext
Requires
- php: >=5.4.0
- ext-pcre: *
This package is auto-updated.
Last update: 2025-10-26 06:16:36 UTC
README
This is a Gettext plugin for the PHP Fat-Free Framework.
It doesn't need PHP gettext extension!
Installation
1. Just download the package and register it to AUTOLOAD, or require it with composer:
composer require nimah79/f3-gettext
2. Add this sample configuration, or load the sample ini file (make necessary changes):
[GETTEXT]
language=fa
path=locales/
3. Put your .po files in the path you defined.
Usage
Use __() instead of _() or gettext():
echo __('Hello!'); // "سلام!"