App use system language for location authorization dialog

On IOS there is 2 ways to select app language :

  1. settings-general -language
  2. settings - your app - language

if an app require authorisation for localisation like requestWhenInUseAuthorization , the displayed text is always in the language specified by the general language setting.

Setting the required string in InfoPlist.strings is not enough and there may be a problem in iOS : once can check this with the Apple official Weather App installed by default on iPhone.

How to reproduce :

  • Set your device (general-language) in English.
  • set WeatherApp( settings-weather-language) in French.
  • set weatherApp Location to ask next time.
  • start weather app

it will ask for permission with a message in English while all other part of app are in French. I tested with other languages and it is still the same.

This may finish in Apple refuse an app in AppStore review process with that « user may expect to have authorisation dialog in the language they choose for the app», but there is nothing that can be done as even Apple Software as the same problem.

Have you any workaround like preventing to change app language to something different than system language ?

I have already filled a Feedback.

Look here (not tested):

https://blog.devgenius.io/how-to-force-change-app-language-programmatically-without-breaking-your-app-1c73be9608e0

Or, pretty much the same:

https://www.codebales.com/how-programmatically-change-app-language-without-restarting-app

But I'm not sure there is no side effect or any call to private API.

Works as expected. The system alert is governed by the OS not the application preference.

@MobileTen : The problem is that Apple can refuse an app for this problem which not under developer responsibility.

Has your app actually been rejected for this? That would almost certainly be a mistake by App Review. I have various apps on my phone here that behave exactly like this (location prompts in device language) as expected.

(I don't think my anecdotal evidence falls under the rule of “past review performance is no guarantee of future results” because in this case it’s behavior provided by the system that is working exactly as designed.)

Hi, could you share the feedback number here? Thank you

App use system language for location authorization dialog
 
 
Q