Browse Source

[documentation] document translatable usage regarding default locale

gedi 13 years ago
parent
commit
0939148dc3
2 changed files with 18 additions and 25 deletions
  1. 5 22
      README.md
  2. 13 3
      doc/translatable.md

+ 5 - 22
README.md

@@ -9,6 +9,11 @@ master branch is based on 2.3.x versions and may not work with older components.
 
 
 ### Latest updates
 ### Latest updates
 
 
+**2012-02-15**
+
+- Add option to force **Translatable** store translation in default locale like any other.
+See (documentation)(http://github.com/l3pp4rd/DoctrineExtensions/blob/master/doc/translatable.md#advanced-examples)
+
 **2012-01-29**
 **2012-01-29**
 
 
 - Translatable finally has **Personal Translations** which can relate through a real **foreign key**
 - Translatable finally has **Personal Translations** which can relate through a real **foreign key**
@@ -41,28 +46,6 @@ support. In general extensions are **BC** with versions 2.1.x, 2.2.x of doctrine
 All recent documentation based on [extension docs](https://github.com/l3pp4rd/DoctrineExtensions/tree/master/doc)
 All recent documentation based on [extension docs](https://github.com/l3pp4rd/DoctrineExtensions/tree/master/doc)
 will be available there too. Also it will be a good example for symfony2 users.
 will be available there too. Also it will be a good example for symfony2 users.
 
 
-**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)
-- Added [example](https://github.com/l3pp4rd/DoctrineExtensions/tree/master/example)
-on how to create entity manager with extensions hooked using environment without framework
-- To run this example follow the documentation on the bottom of this document
-
-**2011-10-30**
-
-- Support for doctrine common **2.2.x** with backward compatibility. Be sure to use all components
-from the specific version, etc.: **2.2.x** or **2.1.x** both are supported
-
-**2011-10-23**
-
-- [@everzet](https://github.com/everzet) has contributed the **Translator** behavior, which indeed
-is a more explicit way of handling translations in your projects
-
 ### Summary and features
 ### Summary and features
 
 
 This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and
 This package contains extensions for Doctrine2 that hook into the facilities of Doctrine and

+ 13 - 3
doc/translatable.md

@@ -61,7 +61,7 @@ and any number of them
 - Public [Translatable repository](http://github.com/l3pp4rd/DoctrineExtensions "Translatable extension on Github") is available on github
 - Public [Translatable repository](http://github.com/l3pp4rd/DoctrineExtensions "Translatable extension on Github") is available on github
 - Using other extensions on the same Entity fields may result in unexpected way
 - Using other extensions on the same Entity fields may result in unexpected way
 - May inpact your application performace since it does an additional query for translation if loaded without query hint
 - May inpact your application performace since it does an additional query for translation if loaded without query hint
-- Last update date: **2012-01-28**
+- Last update date: **2012-02-15**
 
 
 **Portability:**
 **Portability:**
 
 
@@ -574,9 +574,19 @@ To set translation fallback:
 $translatableListener->setTranslationFallback(true); // default is false
 $translatableListener->setTranslationFallback(true); // default is false
 ```
 ```
 
 
-**Note**: Default locale should be set on the **TranslationListener** initialization
+**Note**: Default locale should be set on the **TranslatableListener** initialization
 once, since it can impact your current records if it will be changed. As it
 once, since it can impact your current records if it will be changed. As it
-will not store extra record in translation table. 
+will not store extra record in translation table by default.
+
+If you need to store translation in default locale, set:
+
+``` php
+<?php
+$translatableListener->setPersistDefaultLocaleTranslation(true); // default is false
+```
+
+This would always store translations in all locales, also keeping original record
+translated field values in default locale set.
 
 
 ### Translation Entity
 ### Translation Entity