Localization Testing when using StoreKit Configuration
Today I ran into an unexpected “issue” with my StoreKit configuration file while I was starting to localize my birthdays reminders app.
Here’s what happened — and how I fixed it.
Setting Up Localization
I added a new language to my Localizable.xcstrings
file and translated all the strings.
To test the new language, I set it in my scheme and ran the app in the simulator. At first glance, everything looked fine — the app used the new translations as expected.
Until I opened the paywall.
The Paywall Problem
On the paywall, the app was still showing the English (U.S.) translations.
I’m using StoreKit’s SubscriptionStoreView
with a custom header, so my first assumption was that StoreKit might be pulling the the systems language setting. However, running the app on a device with the correct system language set didn’t fix it either.
I started searching for solutions online but couldn’t find anything relevant.
StoreKit Configuration
After a few minutes of digging, I remembered the local *.storekit
file I use for debugging subscription options. I opened it — and there it was: another language setting, still set to English (U.S.). Once I changed the language in the StoreKit configuration file too, the localization finally worked correctly during debugging.
Why It Matters (and Why It Doesn’t)
This issue won’t affect users once the app is distributed through TestFlight or the App Store, because StoreKit configuration files are ignored in production.
But for local testing, making sure the StoreKit file matches the app’s test language is essential if you want to properly preview localized subscription screens.
Note to My Future Self
I don’t expect many others to encounter this, but I’m mainly writing this for my future self.
If I ever run into the same problem again and end up searching for it — hopefully, I’ll find my own article and save a few minutes next time!