Testing In-App purchases for multilanguage
Asked Answered
Y

2

11

I have included various localized descriptions in iTunesConnect (English, French, Chinese) for an in-app product. I am displaying the localizedTitle and localizedDescription properties after fetching them from apple's server using an SKProductsRequest.

My understanding from the docs and other threads is that if I change the test phone to the relevant language it will display the correct language. However in testing with my phone in French or Chinese the product descriptions are still in the original English.

I am not logged on with any iTunes account during the testing (Settings=>Store=>Signout).

Can anyone provide any hints how to test the IAP multilingual functionality?

Ytterbia answered 6/2, 2012 at 5:7 Comment(0)
R
13

I believe the localization that the store returns for the product description is based on the assigned iTunes store of the test user you are using. The device's language setting only pertains to the resources loaded locally.

Ratepayer answered 6/2, 2012 at 6:32 Comment(2)
As I mentioned above, I am not logged in with any user when retrieving product information from iTunes. There is another thread which says the phone language drives language viewed. If I can find it I will link it here.Ytterbia
I have tried to change country of Apple id, country/region of iPhone, created a sandbox user for different country i still getting localisedTitle in english.Reachmedown
Y
8

After further testing I have confirmed that @claireware was in fact correct in his answer.

The tester is not able to manually change or set the store for testing (Apple docs state not to login with test user (Settings=>Store=>Signin)). However if you make a test purchase and enter the test users credentials at the prompt the device will warn you that it is changing to the test user country's iTunes store. After you make a test purchase the test user will be logged in and your subsequesnt SKProductRequest will return information localized for that store.

In summary for localization testing I followed these steps:

  1. In iTunesConnect create one or more SKProducts with localized text in English, French and Chinese. (no I dont know French, so I just used random French words for testing)
  2. Created two new test user accounts: [email protected] & [email protected], set to the France and China store respectively.
  3. On the device go to Settings=>Store=>Signout
  4. Run the app and initiate a purchase
  5. At itunes account dialog prompt login with frenchtestuser account
  6. AFter purchase complete perform a new SKProductsRequest
  7. Confirm dialog prompts and product details display the French localization
  8. Close app and start again from step 3 this time logging in with chinatestuser account.
Ytterbia answered 19/2, 2012 at 13:9 Comment(1)
I followed you, but it did not help.Reachmedown

© 2022 - 2024 — McMap. All rights reserved.