The extraction process is done by extractors. We have 2 extractors right now: a PHP one and a YAML one.
The plugin extracts strings from an application (with extract classes) and looks for string in: - global - templates (/apps/app/templates) - librairies (/apps/app/lib) - modules: - in all PHP files in actions/ lib/ and templates/ directories - in generator.yml files (titles, field names, category names, field help messages) - in validate/*.yml files (error messages) The PHP extractor looks for calls to __() method or function, so it works with __('') or ->__(''). It also looks for the format_number_choice() helper. As it's done with the PHP tokenizer, it works with strings delimited with '', "" and HERDOCS too. Have a look at unit tests to see all working combinations. To add some more files, locations, you just have to add some class that inherits from sfExtract and you can also add some extractors if you need. The i18n extract framework is very abstracted, so it's quite easy to extend. Fabien Lukas Kahwe Smith wrote: > Hey, > > I have another question regarding this plugin. From what files does it > extract translation keys? Only templates, or also validation.yml files > and action code? > > Generally I presume its important to make sure that translation keys are > directly embedded inside all calls to __() to make sure that they can be > found by scanners. Any other best practices people can share in order to > more easily maintain translations? > > regards, > Lukas > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---