PHPackages                             matecat/xliff-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. matecat/xliff-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

matecat/xliff-parser
====================

A Xliff parser written in PHP

v3.0.7(3d ago)14143.4k↓29.6%13[2 issues](https://github.com/matecat/xliff-parser/issues)[2 PRs](https://github.com/matecat/xliff-parser/pulls)MITPHPPHP &gt;=8.3

Since Aug 26Pushed 3d ago6 watchersCompare

[ Source](https://github.com/matecat/xliff-parser)[ Packagist](https://packagist.org/packages/matecat/xliff-parser)[ Docs](https://github.com/matecat/xliff-parser)[ RSS](/packages/matecat-xliff-parser/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (20)Versions (229)Used By (0)

Xliff Parser
============

[](#xliff-parser)

![license](https://camo.githubusercontent.com/8d916d6eddff582be7590a3b12746a1a58065d04bb2edd31aa51cd500860fc0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6174656361742f786c6966662d7061727365722e737667)![Packagist](https://camo.githubusercontent.com/20ea5af383eb842e010266b1952c2fe005c3c09f93dd8a9170d3dd3c6d8aebad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174656361742f786c6966662d7061727365722e737667)[![Quality Gate Status](https://camo.githubusercontent.com/a1ddda05743d001bcfbaf35625be9525e3b2efee9fe36f4d7811a2389820ff02/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6d6174656361745f786c6966662d706172736572266d65747269633d616c6572745f737461747573)](https://sonarcloud.io/summary/new_code?id=matecat_xliff-parser)[![Coverage](https://camo.githubusercontent.com/f8211c294852d1404f36b4cf112f29793593b64bb88182c2149c80b207d220ca/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6d6174656361745f786c6966662d706172736572266d65747269633d636f766572616765)](https://sonarcloud.io/summary/new_code?id=matecat_xliff-parser)[![Reliability Rating](https://camo.githubusercontent.com/7d41691779b7e249dcb0d417793a968d7f1a6a400cb518194452cac5b1b5bef1/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6d6174656361745f786c6966662d706172736572266d65747269633d72656c696162696c6974795f726174696e67)](https://sonarcloud.io/summary/new_code?id=matecat_xliff-parser)[![Maintainability Rating](https://camo.githubusercontent.com/d7f92c542e4a7b0ccd397548676494fd8728e7e56dd8509cdc4e2e0159b1c39b/68747470733a2f2f736f6e6172636c6f75642e696f2f6170692f70726f6a6563745f6261646765732f6d6561737572653f70726f6a6563743d6d6174656361745f786c6966662d706172736572266d65747269633d7371616c655f726174696e67)](https://sonarcloud.io/summary/new_code?id=matecat_xliff-parser)

This library is a simple, agnostic Xliff parser specifically written for [Matecat](https://www.matecat.com).

Installation
------------

[](#installation)

```
composer require matecat/xliff-parser
```

Xliff Support
-------------

[](#xliff-support)

Xliff supported versions:

- [1.0](http://www.oasis-open.org/committees/xliff/documents/contribution-xliff-20010530.htm)
- [1.1](http://www.oasis-open.org/committees/xliff/documents/xliff-specification.htm)
- [1.2](http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html)
- [2.0](http://docs.oasis-open.org/xliff/xliff-core/v2.0/xliff-core-v2.0.html#data)

Methods
-------

[](#methods)

- [xliffToArray](https://github.com/matecat/xliff-parser/blob/master/docs/xliffToArray.md) - converts a xliff file into an array
- [replaceTranslation](https://github.com/matecat/xliff-parser/blob/master/docs/replaceTranslation.md) - replace a translation in a xliff file

Logging
-------

[](#logging)

You can inject your own logger (must be a `LoggerInterface` implementation):

```
// ...

// $logger must be implement PS3 LoggerInterface
$parser = new XliffParser($logger);
```

Support
-------

[](#support)

If you found an issue or had an idea please refer [to this section](https://github.com/mauretto78/xliff-parser/issues).

Authors
-------

[](#authors)

- **Domenico Lupinetti** - [github](https://github.com/ostico)
- **Mauro Cassani** - [github](https://github.com/mauretto78)

License
-------

[](#license)

This project is licensed under the GNU Lesser General Public License v3.0 or later. - see the [LICENSE.md](LICENSE.md) file for details

###  Health Score

66

—

FairBetter than 99% of packages

Maintenance96

Actively maintained with recent releases

Popularity43

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity89

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 79.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~13 days

Recently: every ~29 days

Total

159

Last Release

3d ago

Major Versions

v1.0.114 → v2.0.02023-09-27

v1.0.115 → v2.0.52023-12-21

v2.2.13 → v3.0.0-beta2026-02-13

PHP version history (3 changes)v1.0PHP &gt;=5.5

v2.2.0PHP &gt;=7.4

v3.0.0-betaPHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/54114553?v=4)[MateCat-bot](/maintainers/MateCat-bot)[@MateCat-bot](https://github.com/MateCat-bot)

---

Top Contributors

[![mauretto78](https://avatars.githubusercontent.com/u/10035321?v=4)](https://github.com/mauretto78 "mauretto78 (255 commits)")[![Ostico](https://avatars.githubusercontent.com/u/8008416?v=4)](https://github.com/Ostico "Ostico (62 commits)")[![davidlg](https://avatars.githubusercontent.com/u/483676?v=4)](https://github.com/davidlg "davidlg (2 commits)")[![rulatir](https://avatars.githubusercontent.com/u/677694?v=4)](https://github.com/rulatir "rulatir (1 commits)")[![Weissheiten](https://avatars.githubusercontent.com/u/8425188?v=4)](https://github.com/Weissheiten "Weissheiten (1 commits)")[![xepozz](https://avatars.githubusercontent.com/u/6815714?v=4)](https://github.com/xepozz "xepozz (1 commits)")

---

Tags

phpparsingxliff

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/matecat-xliff-parser/health.svg)

```
[![Health](https://phpackages.com/badges/matecat-xliff-parser/health.svg)](https://phpackages.com/packages/matecat-xliff-parser)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69735.1M160](/packages/algolia-algoliasearch-client-php)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

187557.3k3](/packages/wikimedia-parsoid)[pontedilana/php-weasyprint

PHP library allowing PDF generation from an url or a html page. Wrapper for Kozea/WeasyPrint.

781.2M17](/packages/pontedilana-php-weasyprint)[symfony/json-streamer

Provides powerful methods to read/write data structures from/into JSON streams.

18641.1k32](/packages/symfony-json-streamer)[bitrix24/b24phpsdk

An official PHP library for the Bitrix24 REST API

10244.2k5](/packages/bitrix24-b24phpsdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
