A Java library to access Crowdin API. Crowdin provides RESTful API with XML or JSON over HTTP using GET or POST methods. With a help of this SDK you can smooth the work with all Crowdin API methods in your Java project, such as adding and updating files, downloading translations or integrating localization with your development process.
git clone https://github.com/crowdin/crowdin-java-sdk.git
gradle buildJavaSdkJar
Once you have completed the Installation, you could make the first call:
public static final String BASE_URL = "https://api.crowdin.com/api/";
public static final String PROJECT_IDENTIFIER = "your-project-identifier";
public static final String PROJECT_KEY = "your-project-key";
public static final String ACCOUNT_KEY = "your-account-key";
Credentials credentials = new Credentials(BASE_URL, PROJECT_IDENTIFIER, PROJECT_KEY, ACCOUNT_KEY);
CrowdinApiParametersBuilder parameters = new CrowdinApiParametersBuilder();
parameters.json();
CrowdinApiClient crwdn = new Crwdn();
crwdn.getInfo(credentials, parameters);
System.out.println(crwdn.getInfo(credentials, parameters).getEntity(String.class));
{
"languages":[...],
"files":[...],
"details":{
"source_language":{
"name":"Ukrainian",
"code":"uk"
},
"name":"crowdin2",
"identifier":"crowdin2",
"created":"2016-11-09 07:20:33",
"description":"",
"join_policy":"private",
"last_build":"2016-12-07 10:00:27",
"last_activity":"2016-12-16 08:53:32",
"participants_count":"1",
"total_strings_count":"24",
"total_words_count":"24",
"duplicate_strings_count":22,
"duplicate_words_count":22,
"invite_url":{
"translator":"https:\/\/crowdin.com\/project\/crowdin2\/invite?d=b555o4i6o6f5h5b3m4c333453",
"proofreader":"https:\/\/crowdin.com\/project\/crowdin2\/invite?d=755565j6b6f5h5b3m4c3455323"
}
}
}
Need help working with Crowdin API Java SDK or have any questions? Contact Support Team.