mouf / utils.i18n.fine.db-translator
Fine is a PHP internationalisation package. It will help you provide applications that support several languages. FINE means: Fine is not english :). This package provides a DB mapper that stores translations in database.
Installs: 3 654
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 15
Forks: 0
Open Issues: 0
Type:mouf-library
Requires
- php: >=5.4.0
- mouf/database.doctrine-dbal-wrapper: ~1.1
- mouf/database.patcher: ~2.0
- mouf/mouf-installer: ~2.0
- mouf/utils.cache.apc-cache: ~2.1
- mouf/utils.i18n.fine.common: ~4.0
- mouf/utils.i18n.fine.language-detection: ~4.0
- mouf/utils.i18n.fine.translation-interface: ~4.0
Requires (Dev)
- mouf/mouf: ~2.0
- mouf/utils.cache.in-memory-cache: ~1.0
- mouf/utils.log.errorlog_logger: ~2.0
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-11-15 05:19:57 UTC
README
Fine is Mouf's PHP internationalisation package. It will help you develop applications that support several languages.
Most of the time, you will use Fine with the FileTranslator that stores translations in PHP mapping files. This package contains one alternative translator that stores translations in database rather than in files.
Why?
Use this DbTranslator if you want to make translations editable by your users. You can then directly write
the translations in the message_translations
table that is created by this package.
Dependencies
Fine comes as a Composer package and requires the "Mouf" framework to run. The first step is therefore to install Mouf.
Once Mouf is installed, you can process to the Fine and DbTranslator installation.
Installation
A typical composer.json file might look like this:
{ "require": { "mouf/mouf" : "~2.0.0", "mouf/utils.i18n.fine.common" : "~4.0", "mouf/utils.i18n.fine.db-translator" : "~4.0", "mouf/utils.i18n.fine.manage.bo" : "~4.0" }, "minimum-stability": "dev" }
mouf/utils.i18n.fine.db-translator refers to this package and mouf/utils.i18n.fine.manage.bo is package that contains the user interface in Mouf to view/edit translations.
To install the dependency, run:
composer update
Now, go to the Mouf UI (http://[your_server]/[your_app]/vendor/mouf/mouf) and process to the package installation by clicking the "Run installation tasks" button.
You can now edit your translations directly using the "HTML > Fine" menu.
Behind the scenes, the Mouf installer has created a dbTranslatorService
instance and binded it to the defaultTranslatorService
.
You can keep using Fine is you would usually do (using the defaultTranslatorService
) and the dbTranslatorService
will automatically be called.