From fceb53eae618982d07b85719ba30f968f5f2fc4c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 20 Mar 2009 07:51:00 +0000 Subject: [PATCH] MINOR documentation git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73464 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Translatable.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/core/model/Translatable.php b/core/model/Translatable.php index c8e38923e..2c1a83d7a 100755 --- a/core/model/Translatable.php +++ b/core/model/Translatable.php @@ -58,6 +58,18 @@ * through setting $_COOKIE['lang'], $_SESSION['lang'] or $_GET['lang']. * Pages in different languages can have different publication states * through the {@link Versioned} extension. + * + * Note: You can't get Children() for a parent page in a different language + * through set_reading_lang(). Get the translated parent first. + * + * + * // wrong + * Translatable::set_reading_lang('de'); + * $englishParent->Children(); + * // right + * $germanParent = $englishParent->getTranslation('de'); + * $germanParent->Children(); + * * *

Translation groups

*