- // support multi-lingual requests
- if ($language = \CRM_Utils_Array::value('option.language', $apiRequest['params'])) {
+ $params = $apiRequest['params'];
+ if ($apiRequest['version'] < 4) {
+ $language = !empty($params['options']['language']) ? $params['options']['language'] : \CRM_Utils_Array::value('option.language', $params);
+ }
+ else {
+ $language = \CRM_Utils_Array::value('language', $params);
+ }
+ if ($language) {