Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
If took me a while to figure out how to enable the translation behavior, the needed Translatable on the main entity wasn't too clear. I updated the documentation to better explain the steps needed.
  • Loading branch information
Mondane committed Jun 29, 2014
1 parent 3b9c1e4 commit 252ba7d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,11 @@ class CategoryTranslation
}

```
The corresponding Category entity needs to `use ORMBehaviors\Translatable\Translatable;`.

Now you can work on translations using `translate` or `getTranslations` methods.
NB If you generate the entity with `./console doctrine:generate:entity`, you have to remove the private $id and the `setId` and `getId` functions.

After updating the database, ie. with `./console doctrine:schema:update --force`, you can now work on translations using `translate` or `getTranslations` methods.

``` php

Expand Down

0 comments on commit 252ba7d

Please sign in to comment.