![]() |
|
sfI18nExtractPlugin - 1.0.5i18n string extractor plugin. |
|
The sfI18nExtract is a symfony plugin that provides i18n strings extraction.
This plugin is a backport of a symfony 1.1 native feature.
Install the plugin
symfony plugin-install http://plugins.symfony-project.com/sfI18nExtractPlugin
Clear you cache
symfony cc
The i18n-extract task parses a symfony application to extract all the strings that need to be translated.
It takes an application and a culture as its arguments:
php symfony i18n-extract frontend en
By default, the task does not modify your dictionaries, it just outputs the number of new and old i18n strings. To append the new strings to your dictionary, you can pass the --auto-save option:
php symfony i18n-extract --auto-save frontend en
You can also delete old strings automatically by passing the --auto-delete option:
php symfony i18n-extract --auto-save --auto-delete frontend en
apps/myapp/i18n/messages.XX.xml fileThe patches needed to convert the symfony 1.1 implementation to the one used in this plugin can be obtained with the 2 following commands:
svn diff http://svn.symfony-project.com/trunk/lib/i18n/extract/ http://svn.symfony-project.com/plugins/sfI18nExtractPlugin/lib
svn diff http://svn.symfony-project.com/trunk/data/tasks/sfPakeI18N.php http://svn.symfony-project.com/plugins/sfI18nExtractPlugin/data/tasks/sfPakeI18N.php