ArtSabintsev / Siren

Notify users when a new version of your app is available and prompt them to upgrade.
http://sabintsev.com/
MIT License
4.24k stars 407 forks source link

Add `lang` parameter to APIManager #391

Closed kientux closed 2 years ago

kientux commented 2 years ago

Currently APIManager has country parameter but App Store repsonse still always show localization as English even for multi-language app. If someone wants to show a custom alert with some other language for release notes, they simple can't.

This can be achieve by adding lang parameter to APIManager, reference.

ArtSabintsev commented 2 years ago

Hey,

This looks good.

Correct me if I'm wrong, this only support Japanese at this point based on the docs, right? At least that's what the docs call out explicitly, and it seems the docs have not been updated in 5 years, so I'm wondering if it supports another 5-letter code.

Have you tested it with other locales?

kientux commented 2 years ago

Thanks for your response. Yes I tested it on several locales, and it works as expected, not just Japanese. Actually the repsonse language will be combined from country and lang parameters, for example you will get Japanese for country=JP&lang=JA_JP but still get English for country=US&lang=JA_JP. I don't know if this should be noted somewhere on README.

kientux commented 2 years ago

I tested this with Evernote, which supports a bunch of locale: https://itunes.apple.com/lookup\?id\=406056744\&country\=vn\&lang\=vi_vn

ArtSabintsev commented 2 years ago

ok cool, confirmed it's working. Going to merge this in and push it out. Thanks so much!