function prepare() { parent::prepare(); if (isset($this->attributes['locale_type'])) { if (strtolower($this->attributes['locale_type']) == 'content') { $locale_constant = constant('CONTENT_LOCALE_ID'); } else { $locale_constant = constant('MANAGEMENT_LOCALE_ID'); } } else { $locale_constant = constant('MANAGEMENT_LOCALE_ID'); } if (isset($this->attributes['locale_value'])) { if (isset($this->attributes['locale_file'])) { $this->attributes['value'] = strings::get($this->attributes['locale_value'], $this->attributes['locale_file'], $locale_constant); } else { $this->attributes['value'] = strings::get($this->attributes['locale_value'], 'common', $locale_constant); } } }