yeriomin / play-store-api

Google Play Store protobuf API wrapper in java
GNU General Public License v3.0
324 stars 131 forks source link

translatedDescriptionHtml #20

Closed Attect closed 6 years ago

Attect commented 6 years ago

how can I get it? It's a translated version text of description with given local. Thanks.

yeriomin commented 6 years ago

It is always translated as far as I know. If you supply the locale to the api wrapper and if the description is translated by the app developer (you can see in in Play Store app), descriptionHtml will contain translated description.

Attect commented 6 years ago

I use this:

deviceInfoProvider.setLocaleString(Locale.CHINA.toString());

And try to find translate from here DetailsTask.java

protected App getResult(GooglePlayAPI api, String... arguments) throws IOException {
        DetailsResponse response = api.details(packageName);
        Log.d("DEBUG","description:" + response.getDocV2().getDescriptionHtml());

It seem to doesn't containt translate text.

yeriomin commented 6 years ago

Like I said:

if the description is translated by the app developer (you can see in in Play Store app)

Is it translated in the Play Store app?

Try

api.setLocale(Locale.CHINA);
Attect commented 6 years ago

Sorry,my mistake translatedDescriptionHtml is translated content by Google Translate,not translate by app author. I have been find this field in https://github.com/dweinstein/node-google-play

IRGC commented 5 years ago

in the DocV2 expect translated description at position 23 example add line to your .proto file optional string translatedDescriptionHtml = 23;

for some language descriptionHtml itself contain the requested language. so first check translatedDescriptionHtml is empty or not.