PHPackages                             neatous/doctrine-extensions-translatable - 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. [Database &amp; ORM](/categories/database)
4. /
5. neatous/doctrine-extensions-translatable

ActiveLibrary[Database &amp; ORM](/categories/database)

neatous/doctrine-extensions-translatable
========================================

A Doctrine extension for managing translatable entities and their translations.

v1.0.0(11mo ago)05.7k↓22.7%MITPHPPHP &gt;=8.1

Since Jun 5Pushed 11mo agoCompare

[ Source](https://github.com/neatous/doctrine-extensions-translatable)[ Packagist](https://packagist.org/packages/neatous/doctrine-extensions-translatable)[ RSS](/packages/neatous-doctrine-extensions-translatable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

Doctrine Extensions: Translatable
=================================

[](#doctrine-extensions-translatable)

A Doctrine extension for managing translatable entities and their translations. This library was extracted from the `KnpLabs/DoctrineBehaviors` project to provide a more lightweight solution for translatable behavior.

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

[](#installation)

This library is available via Composer.

First, make sure you have Composer installed. If not, you can follow the instructions [here](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos).

Then, require the package in your project:

```
composer require neatous/doctrine-extensions-translatable
```

This command will add `neatous/doctrine-extensions-translatable` to your `composer.json` file and install the necessary dependencies, including `doctrine/orm`, `doctrine/persistence`, `doctrine/collections`, and `nette/utils`.

Usage
-----

[](#usage)

### 1. Define your Translatable Entity

[](#1-define-your-translatable-entity)

Your translatable entity should use the `TranslatableTrait` and implement `TranslatableInterface`.

```
