Translations are now automatically downloaded from the Replay Mod API

Localized missing Strings
This commit is contained in:
CrushedPixel
2015-04-29 16:57:18 +02:00
parent 1cf164d325
commit 142b2c8d4d
7 changed files with 124 additions and 16 deletions

View File

@@ -71,6 +71,13 @@ public class ApiClient {
return info;
}
public String getTranslation(String languageCode) throws IOException, ApiException {
QueryBuilder builder = new QueryBuilder(ApiMethods.get_language);
builder.put("language", languageCode);
String properties = SimpleApiClient.invokeUrl(builder.toString());
return properties;
}
public void downloadThumbnail(int file, File target) throws IOException {
QueryBuilder builder = new QueryBuilder(ApiMethods.get_thumbnail);
builder.put("id", file);

View File

@@ -12,5 +12,5 @@ public class ApiMethods {
public static final String remove_file = "remove_file";
public static final String rate_file = "rate_file";
public static final String check_auth = "check_auth";
public static final String get_language = "get_language";
}