SDK for integrating with the Smartling API. The Smartling API allows developers to upload language specific resource files and download the translations of those files for easy integration within their application. http://docs.smartling.com
Current sdk doesn't allow to specify custom API URL for tests purposes. Also we should keep interface of php sdk consistent with other sdk.
DoD:
[ ] Add one more constructor to SmartlingAPI class
public function __construct($baseUrl, $apiKey, $projectId) {}
[ ] Add support of "Locale Based Approval" feature. This feature includes to parameters for upload service
localesToApprove - With this new parameter we can specify for which locales all strings into file will be approved, for all other locales strings will be excluded. Example:
overwriteApprovedLocales - you must set this parameter false. In this case api will care about locales that were approved before
[ ] The current uploadXXXX implementation allows to pass any parameters
public function uploadFile($path, $fileType, $fileUri, $params = array());
public function uploadContent($content, $fileType, $fileUri, $params = array());
But will be much easy to use some parameters builder, like
Current sdk doesn't allow to specify custom API URL for tests purposes. Also we should keep interface of php sdk consistent with other sdk. DoD:
SmartlingAPI
classupload
servicelocalesToApprove
- With this new parameter we can specify for which locales all strings into file will be approved, for all other locales strings will be excluded. Example:overwriteApprovedLocales
- you must set this parameterfalse
. In this case api will care about locales that were approved beforeuploadXXXX
implementation allows to pass any parametersBut will be much easy to use some parameters builder, like
You can find example of implementation there
/example.php
is updatedFileUploadParameterBuilder
is covered by unit-testsuploadXXXX
are covered by unit-tests