3

As shown in the following screenshot:

enter image description here

Although the device language has been set to Arabic (you could recognize it by checking the status bar and the activity view controller title). However, the cancel button still has the "Cancel" title; Since we are unable to change its title, I assume it should automatically changed depends on the device language -which is Arabic in my case- (to be localized), as mentioned in the this answer.

What am I missing here?

Ahmad F
  • 30,560
  • 17
  • 97
  • 143
  • Can you try another language and see if it changes? Maybe Apple doesn't provide a localized "cancel" string for Arabic language and falls back to english because of that. Mail, Message and the complete bottom row seems to not get translated too. – Pascal_AC Nov 16 '17 at 07:04
  • @Pascal_AC I tried it for other languages: Spanish, French and Japanese, got the same result, cancel button stills has the "Cancel" title. – Ahmad F Nov 16 '17 at 07:35
  • Can you check if you have a language selected in your current scheme? Click on your project name in the top right hand corner -> Edit Scheme -> Run -> Options -> Application Language to check it. This is the only way I can reproduce your issue. – Pascal_AC Nov 16 '17 at 09:02
  • @Pascal_AC the application language -by default- is "System Language", should it be as is? – Ahmad F Nov 16 '17 at 09:56
  • Yeah "System Language" is what it should be, I was able to reproduce this issue when I set the application language to english. However, for me it is working fine when I set my device to German but when I set it to Arabic the cancel button still shows the german text (it's my apps default language). I'd normally assume that something basic like "cancel" is translated in all supported languages but I'm running out of ideas, sorry. – Pascal_AC Nov 16 '17 at 10:03

1 Answers1

10

I found a solution which worked for me with my device language set to Arabic.
Go to your Info.plist and add Localized resources can be mixed with Boolean YES to it.

As mentioned in Core Foundation Keys:

CFBundleAllowMixedLocalizations

CFBundleAllowMixedLocalizations (Boolean - iOS, macOS) specifies whether the bundle supports the retrieval of localized strings from frameworks. This key is used primarily by Foundation tools that link to other system frameworks and want to retrieve localized resources from those frameworks.

Ahmad F
  • 30,560
  • 17
  • 97
  • 143
Pascal_AC
  • 541
  • 4
  • 17
  • Great ! But on Ipad. Note App and Reminders App not change. I checked on Share on Safari or Chrome, Both this app can still change the localizations – Hai Nguyen Jan 14 '21 at 03:07