When you want to add translations then you have probably already used the scan option from Zend_Translate.
It allows you to search complete directory structures for translations.

The scan option has two ways how it can be used.LOCALE_FILENAME and LOCALE_DIRECTORY.

They define how the language will be detected out of the directory and filename.LOCALE_FILENAME means that the locale/language this translation file will be added to, will be detected by looking within the filename. And LOCALE_DIRECTORY does the same for the directory where this file has been detected.
Some example:

But sometimes you may need to exclude some of the files and directories within the structure you are searching.
Therefor you can use the ignore option.

As with 1.10.3 this option accepts 3 syntax to be used.

You can use a single string… per default it is set to “.” which means that all files and directories beginning with “.” are ignored. For example all SVN directories begin with “.” and are per default ignored. All files within this path will not be added.

The second line would ignore “\dir\test\en.mo” or “\dir\testme.mo” but it would accept “\dir\mytest.mo” as the later doe s not begin with “test”. You may want to change this option. But be aware that, when you overwrite the “.”, all SVN directories will be searched. So don’t do this when you are working on or with SVN.

As second syntax you can use an array. This allows you to search for several syntax. But also using an array means, like using strings, that the directory or file has to begin with this pattern.

Still there could be a problem… the directory or filename could have a syntax where it does not begin with a string. Here you have to use the third syntax. It allows you to use regular expressions to search for files and directories which have to be ignored.