public function SmartlingApi::import in TMGMT Translator Smartling 8
Import files form Service.
Parameters
string $fileUri: The Smartling URI for file that contains the original language strings already uploaded to Smartling.
string $fileType: The type of file used for imports. Valid values are: ios, android, gettext, javaProperties, xml, json, yaml, and csv.
string $locale: The Smartling locale identifier for the language Smartling is importing.
string $fileRealPath: Absolute path to the file on your local machine that contains the translated content,
string $translationState: Value indicating the workflow state to import the translations into. Content will be imported into the language's default workflow. Could be 'PUBLISHED' or 'POST_TRANSLATION'.
array $params: (optional) An associative array of additional options, with the following elements:
- 'overwrite': Boolean indicating whether or not to overwrite existing translations.
Return value
string
Throws
\Drupal\tmgmt_smartling\Smartling\SmartlingApiException
See also
http://docs.smartling.com/pages/API/Translation-Imports/
File
- src/
Smartling/ SmartlingApi.php, line 399
Class
Namespace
Drupal\tmgmt_smartling\SmartlingCode
public function import($fileUri, $fileType, $locale, $fileRealPath, $translationState, $params = []) {
$params['fileUri'] = $fileUri;
$params['fileType'] = $fileType;
$params['locale'] = $locale;
$params['file'] = $fileRealPath;
$params['translationState'] = $translationState;
return $this
->sendRequest('file/import', $params, 'POST');
}