diff --git a/code/model/Widget.php b/code/model/Widget.php index 5da61e4..43a9ba5 100644 --- a/code/model/Widget.php +++ b/code/model/Widget.php @@ -211,6 +211,12 @@ class Widget_Controller extends Controller { */ function editablesegment() { $className = $this->urlParams['ID']; + if (class_exists('Translatable') && Member::currentUserID()) { + // set current locale based on logged in user's locale + $locale = Member::currentUser()->Locale; + Translatable::set_current_locale($locale); + i18n::set_locale($locale); + } if(class_exists($className) && is_subclass_of($className, 'Widget')) { $obj = new $className(); return $obj->EditableSegment();