symfony/translation · error · InvalidArgumentException
No support implemented for loading XLIFF version
Error message
No support implemented for loading XLIFF version "%s".
What it means
Thrown by XliffUtils::getSchema() when the XLIFF version detected from the file (via getVersionNumber) has no bundled XSD in this component. Supported versions are 1.2, 2.0, 2.1 and 2.2; anything else is rejected.
Solutions
- Convert the file to XLIFF 1.2 or 2.x (2.0/2.1/2.2)
- Correct the version/namespace attributes in the root <xliff> element
- Skip schema validation (avoid validateSchema) and load with the appropriate loader, upgrading the format if needed
Example fix
// before <xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1"> // after <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
Defensive patterns
Strategy: validation
Validate before calling
$version = XliffUtils::getVersionNumber($dom);
if (!in_array($version, ['1.2','2.0','2.1','2.2'], true)) {
// convert the file or skip schema validation
} Try / catch
try {
XliffUtils::validateSchema($dom);
} catch (InvalidArgumentException $e) {
if (str_contains($e->getMessage(), 'No support implemented')) {
// migrate the file to a supported XLIFF version
}
} Prevention
- Standardize on XLIFF 1.2 or 2.x exports
- Check the version attribute before running validateSchema
- Migrate legacy XLIFF 1.0/1.1 files with a conversion tool
When it happens
Trigger: validateSchema() called on an XLIFF file whose namespace-derived version is not one of the supported strings, e.g. version '1.0', '2.3' or garbage after the namespace prefix.
Common situations: Files claiming exotic XLIFF versions, corrupted version attributes, or XLIFF 1.1 exports from legacy tools.
Related errors
- Not a valid XLIFF namespace
- No support implemented for dumping XLIFF version
- The scheme "null" is not supported by this provider.
- Provider " " not found. Available: " ".
- The scheme is not supported by any provider.
AI-assisted analysis of symfony/translation@ae9e8a51bc (2026-09-15).
Data as JSON: /api/errors/f21f9d3b34f3c179.
Report an issue: GitHub.
Appendix: source
Thrown at Util/XliffUtils.php:122
return 'file:///'.$drive.implode('/', array_map('rawurlencode', $parts));
}
private static function getSchema(string $xliffVersion): string
{
if ('1.2' === $xliffVersion) {
$schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-1.2-transitional.xsd');
$xmlUri = 'http://www.w3.org/2001/xml.xsd';
} elseif (\in_array($xliffVersion, ['2.0', '2.1'], true)) {
// XLIFF 2.1 adds optional modules (Change Tracking, ITS, ...) on top of 2.0.
// We validate 2.1 documents against the 2.0 XSD: 2.1 documents that stick to
// the 2.0 core load fine; documents that use 2.1-only modules will fail validation.
$schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-2.0.xsd');
$xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd';
} elseif ('2.2' === $xliffVersion) {
$schemaSource = file_get_contents(__DIR__.'/../Resources/schemas/xliff-core-2.2.xsd');
$xmlUri = 'informativeCopiesOf3rdPartySchemas/w3c/xml.xsd';
} else {
throw new InvalidArgumentException(\sprintf('No support implemented for loading XLIFF version "%s".', $xliffVersion));
}
return self::fixXmlLocation($schemaSource, $xmlUri);
}
/**
* Internally changes the URI of a dependent xsd to be loaded locally.
*/
private static function fixXmlLocation(string $schemaSource, string $xmlUri): string
{
static $newPath;
if (null === $newPath) {
$path = __DIR__.'/../Resources/schemas/xml.xsd';
if (0 !== stripos($path, 'phar://')) {
$newPath = self::getFileUrl($path);
} elseif ($tmpfile = tempnam(sys_get_temp_dir(), 'symfony')) {View on GitHub (pinned to ae9e8a51bc)