+ public function getTranslatedProperty($prop, $lang = null) {
+ if (is_null($lang)) $lang = App::getLocale();
+ foreach ($this->translations as $translation) {
+ if ($translation->locale == $lang) {
+ return $translation->{$prop};
+ }
+ }
+ return $this->{$prop};
+ }
+