| 84 | | $this->object->set_parameter |
|---|
| 85 | | ( |
|---|
| 86 | | $this->_schema->fields[$name]['storage']['domain'], |
|---|
| 87 | | $this->_schema->fields[$name]['storage']['name'], |
|---|
| 88 | | $data |
|---|
| 89 | | ); |
|---|
| | 84 | if ( array_key_exists('multilang', $this->_schema->fields[$name]['storage']) |
|---|
| | 85 | && $this->_schema->fields[$name]['storage']['multilang'] |
|---|
| | 86 | && $_MIDCOM->i18n->get_midgard_language() != 0) |
|---|
| | 87 | { |
|---|
| | 88 | $this->object->set_parameter |
|---|
| | 89 | ( |
|---|
| | 90 | $this->_schema->fields[$name]['storage']['domain'], |
|---|
| | 91 | $this->_schema->fields[$name]['storage']['name'], |
|---|
| | 92 | $data |
|---|
| | 93 | ); |
|---|
| | 94 | } |
|---|
| | 95 | else |
|---|
| | 96 | { |
|---|
| | 97 | $this->object->set_parameter |
|---|
| | 98 | ( |
|---|
| | 99 | $this->_schema->fields[$name]['storage']['domain'], |
|---|
| | 100 | $this->_schema->fields[$name]['storage']['name'] . '_' . $_MIDCOM->i18n->get_content_language(), |
|---|
| | 101 | $data |
|---|
| | 102 | ); |
|---|
| | 103 | } |
|---|
| | 154 | if ( array_key_exists('multilang', $this->_schema->fields[$name]['storage']) |
|---|
| | 155 | && $this->_schema->fields[$name]['storage']['multilang'] |
|---|
| | 156 | && $_MIDCOM->i18n->get_midgard_language() != 0) |
|---|
| | 157 | { |
|---|
| | 158 | // Try to get a translated parameter |
|---|
| | 159 | $translated_value = $this->object->get_parameter |
|---|
| | 160 | ( |
|---|
| | 161 | $this->_schema->fields[$name]['storage']['domain'], |
|---|
| | 162 | $this->_schema->fields[$name]['storage']['name'] . '_' . $_MIDCOM->i18n->get_content_language() |
|---|
| | 163 | ); |
|---|
| | 164 | if ($translated_value) |
|---|
| | 165 | { |
|---|
| | 166 | return $translated_value; |
|---|
| | 167 | } |
|---|
| | 168 | // Otherwise fall back to the lang0 version |
|---|
| | 169 | } |
|---|