1 | <?php |
||
19 | Class Translation extends Package |
||
20 | { |
||
21 | /** |
||
22 | * Upload existing translations to your Crowdin project. |
||
23 | * |
||
24 | * @param Languagefile $languagefile The translation object. |
||
25 | * @param string $language The language tag. |
||
26 | * @param boolean $importDuplicates Defines whether to add translation if there is |
||
27 | * the same translation previously added. |
||
28 | * Acceptable values are: 0 or 1. Default is 0. |
||
29 | * @param boolean $importEqualSuggestions Defines whether to add translation if it is equal to |
||
30 | * source string at Crowdin. |
||
31 | * Acceptable values are: 0 or 1. Default is 0. |
||
32 | * @param boolean $autoImproveImports Mark uploaded translations as approved. |
||
33 | * Acceptable values are: 0 or 1. Default is 0. |
||
34 | * |
||
35 | * @see https://crowdin.com/page/api/upload-translation |
||
36 | * @since 1.0.1 |
||
37 | * |
||
38 | * @return \Psr\Http\Message\ResponseInterface |
||
39 | */ |
||
40 | public function upload( |
||
74 | |||
75 | /** |
||
76 | * Build ZIP archive with the latest translations. Please note that this method can be invoked |
||
77 | * only once per 30 minutes (there is no such restriction for organization plans). Also API |
||
78 | * call will be ignored if there were no changes in the project since previous export. You can |
||
79 | * see whether ZIP archive with latest translations was actually build by status attribute |
||
80 | * ("built" or "skipped") returned in response. |
||
81 | * |
||
82 | * @param string $branch The name of related version branch. |
||
83 | * |
||
84 | * @since 1.0.4 |
||
85 | * @see https://crowdin.com/page/api/export |
||
86 | * |
||
87 | * @return \Psr\Http\Message\ResponseInterface |
||
88 | */ |
||
89 | public function export($branch = '') |
||
101 | |||
102 | /** |
||
103 | * Download ZIP file with translations. You can choose the language of translation |
||
104 | * you need or download all of them at once. |
||
105 | * Note: If you would like to download the most recent translations you may want |
||
106 | * to use export API method before downloading. |
||
107 | * |
||
108 | * @param string $package Language code or "all" to download a bundle with translations to all languages. |
||
109 | * @param string $toPath Local path where to download the translation package. |
||
110 | * @param string $branch The name of related version branch. |
||
111 | * |
||
112 | * @since 1.0.4 |
||
113 | * @see https://crowdin.com/page/api/download |
||
114 | * |
||
115 | * @return \Psr\Http\Message\ResponseInterface |
||
116 | */ |
||
117 | public function download($package, $toPath, $branch = '') |
||
134 | |||
135 | /** |
||
136 | * Track overall translation and proofreading progresses of each target language. |
||
137 | * Default response format is XML. |
||
138 | * |
||
139 | * @see https://crowdin.com/page/api/status |
||
140 | * @since 1.0.4 |
||
141 | * |
||
142 | * @return \Psr\Http\Message\ResponseInterface |
||
143 | */ |
||
144 | public function getStatus() |
||
149 | } |
||
150 |