Localize iOS GeoLocation Permission Message when using Geolocation Capacitor Plugin

I am trying to get our iOS app to display the NSLocationWhenInUseUsageDescription permission message in Spanish when the phone’s language is set to Spanish. I have created infoPlist.string files for English and Spanish but the app always presents the message in English, even though the title and buttons are in Spanish.

What is the secret to getting an Ionic app using a Capacitor plugin to display the permission message in the local language?

Screen Shot 2022-03-23 at 10.35.16 AM

Turns out the language setting in the info.plist was wrong. It was set to Spanish, but should have been es (so the app defaulted to English).

<key>CFBundleLocalizations</key>
	<array>
		<string>en</string>
		<string>es</string>
	</array>

In property list view it shows en as English so I assumed I should use Spanish. Only noticed the difference when I viewed it in source code mode.

1 Like