K
K
KarapetianDav2017-03-18 16:56:32
Java
KarapetianDav, 2017-03-18 16:56:32

Yandex translator API, how to get a list of languages?

I want to get a list of languages ​​available for translation, for some language that will be selected by the user. I read the documentation, but I can’t figure out how to organize POJO so that I can go through all the received language abbreviations and build a list of received ones, but in a convenient form. That is, "ru-Russian".
The json2pojo service builds this class:

public class Langs {

private String af;
private String am;
private String ar;
private String az;
private String ba;
private String be;
private String bg;
...

Fields and getters for them, how can I bypass all fields or getters to get their normal names. I read about reflection, but it seems to be too powerful a tool for such a task.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question