Main menu

Skipped file warnings

FAQ: Why are some files skipped when extracting strings?

Loco Translate has a maximum file size setting which it observes when extracting strings from source code. The default value is 100K, but you can change it to any size you like. Any files that exceed this value will be skipped when looking for translatable strings in source files.

The purpose of this limit is to avoid memory exhaustion which would result in a fatal error and leave you wondering what went wrong. So what can you do about skipped files?

Ignore the warning

Large files being skipped may not contain any translatable strings. If you're confident that Loco Translate is reading all relevant source files then you can simply ignore this warning. Otherwise, try raising the limit.

Raise the file size limit

To ensure Loco Translate reads files over your current limit, go into your plugin settings and set the "Skip PHP files larger than" option to a larger size. Then try running the extraction process again. If you get a fatal error then you don't have enough memory. See Memory size exhausted.

Exclude large files from the source paths

If it's OK for these large files to be skipped, you can get rid of the warning by simply excluding them from the extractable source paths. This can be done in the Advanced tab of your bundle settings.

Not sure?

If you're not sure about any of this then you shouldn't be doing string extraction at all. It's the bundle developer's job to provide a valid strings template, meaning you should never need to run string extraction on the source code. See Working with templates.