How can I download/save translations from a Project in a file? #223
-
I have a crowdin project which I contributed to, and I want to download the translations from that project to use in the app.
The issue I am facing is getting the fileId to use in the below method translationsApi.buildProjectFileTranslation(
projectId,
fileId,
{
targetLanguageId: language
}
); if there is any method by which I can know which translations are completely done and download those, it would be much appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
One of the ways to get both
'fr' is Crowdin language id, 220 is a project id. The response you should expect is like following: {
"data": [
{
"data": {
"fileId": 12,
"eTag": "fd0ea167420ef1687fd16635b9fb67a3",
"words": {
"total": 7249,
"translated": 3651,
"approved": 3637
},
"phrases": {
"total": 3041,
"translated": 2631,
"approved": 2622
},
"translationProgress": 86,
"approvalProgress": 86
}
}
],
"pagination": {
"offset": 0,
"limit": 25
}
} |
Beta Was this translation helpful? Give feedback.
One of the ways to get both
fileId
and its translation progress is to use the Get Language Progress API method. Like this:client.translationStatusApi.withFetchAll().getLanguageProgress(220, 'fr');
withFetchAll()
is to get all results so you don't have to worry about pagination'fr' is Crowdin language id,
220 is a project id.
The response you should expect is like following: