Main menu

Troubleshooting file imports

Most problems are specific to the file format you're importing, but here are some common issues that can arise when importing any type of file.

No translations imported

Firstly check your language mapping to ensure you've told Loco what languages you're extracting from the file.

If your language settings are correct, check they also match contents of your file. Some formats specify language codes, like "en" and Loco may be expecting them to match those in your project.

Parse error or invalid format

If Loco complains it can't parse a file, it could be that your file format isn't supported or the file is not what it says it is. For example if you were to name a Gettext PO file with a .mo file extension, Loco would try to parse it as a binary MO file and this would fail. So check the file contains what you think it does and select the right format if required.

Some parsers are more strict than others. If your file is a generic type like XML, JSON or YAML check the Loco error message for where the problem might be.

No assets extracted

This can happen for the same reasons as above, except some formats can parse without error even if they're the wrong format. Generally this is a deliberate attempt by Loco to be forgiving about minor errors.

An empty import usually means parsing failed, so follow the same steps as if a parse error had occurred.

Partial file imported

When importing large files you might use up your free account quotas more quickly than during manual editing. Import operations will still complete after quotas are exceeded because existing translations may still be modified. This is why you won't see an import error.

Go to your main dashboard and select the "Usage" tab to see what quota you have remaining.

IDs imported as translations

This can be due to the wrong language mapping. If your file maps generic keys to a source language (like "greeting"="Hello") then make sure you tell the importer that your file is indexed by ID, and the "Target" is actually your project's source language.

If your settings are correct, it could be that Loco failed to find the correct source language text in the file and has fallen back to IDs. This is unlikely to happen with simple key/value formats, but can happen with more complex files such as XLIFF which have both ID and source fields.

Asset IDs are altered

Loco won't modify your asset IDs as long as you've told the importer that your file is indexed by IDs. If you declare that your file is indexed by source translations, Loco will automatically generate asset IDs instead. This is a feature, not a bug, so check your language mapping.

Important note: The legacy importer used to modify any IDs that don't "look like" IDs, so check your project settings if your imported IDs are not what you expect.

Old projects

Projects created before June 5th 2016 may be using a deprecated import algorithm which had many known problems. Legacy behaviour can be disabled in your project settings, so please upgrade your project to the latest behaviour before reporting any issues.