Skip to content

Commit

Permalink
[docs] added updated ducumentation, references doctrine-extensions#224
Browse files Browse the repository at this point in the history
  • Loading branch information
l3pp4rd committed Jan 4, 2012
1 parent 68d5d51 commit a67282e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -7,6 +7,11 @@
**Note:** Use 2.1.x tag in order to use extensions based on Doctrine2.1.x versions. Currently
master branch is based on 2.2.x versions and may not work with 2.1.x components.

**2012-01-04**

- Refactored translatable to be able to persist, update many translations
using repository, [issue #224](https://github.com/l3pp4rd/DoctrineExtensions/issues/224)

**2011-12-20**

- Refactored html tree building function, see [documentation](https://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/tree.md)
Expand Down
20 changes: 19 additions & 1 deletion doc/translatable.md
Expand Up @@ -17,6 +17,11 @@ Features:
[blog_reference]: http://gediminasm.org/article/translatable-behavior-extension-for-doctrine-2 "Translatable extension for Doctrine 2 makes automatic record field translations and their loading depending on language used"
[blog_test]: http://gediminasm.org/test "Test extensions on this blog"

**2012-01-04**

- Refactored translatable to be able to persist, update many translations
using repository, [issue #224](https://github.com/l3pp4rd/DoctrineExtensions/issues/224)

**2011-12-11**

- Added more useful translation query hints: Override translatable locale, inner join
Expand Down Expand Up @@ -447,10 +452,23 @@ $article->setContent('content en');
$repository->translate($article, 'title', 'de', 'my article de')
->translate($article, 'content', 'de', 'content de')
->translate($article, 'title', 'ru', 'my article ru')
->translate($article, 'content', 'ru', 'content ru');
->translate($article, 'content', 'ru', 'content ru')
;

$em->persist($article);
$em->flush();

// updating same article also having one new translation

$repo
->translate($article, 'title', 'lt', 'title lt')
->translate($article, 'content', 'lt', 'content lt')
->translate($article, 'title', 'ru', 'title ru change')
->translate($article, 'content', 'ru', 'content ru change')
->translate($article, 'title', 'en', 'title en (default locale) update')
->translate($article, 'content', 'en', 'content en (default locale) update')
;
$em->flush();
```

## Using ORM query hint {#orm-query-hint}
Expand Down

0 comments on commit a67282e

Please sign in to comment.