0

I currently have a project with two localizations: English and French. I also have "en" set up as a value for my "Localization native development region" key in my app's info.plist.

When a user uses French as his phone language - I'm expecting a following behavior:

The app checks "Localizable.strings (French)" file and if it can't find the key there - it defaults to the value in my "Localizable.strings (English)" file.

However, if I currently don't have a certain key in my "Localizable.strings (French)" file - the app displays the entire key (e.g. "my_homescreen_title_label") instead of defaulting to it's value from my "Localizable.strings (English)" file.

Is this an expected behavior? Do you have any suggestions how to implement defaulting to an English value? Thanks!

Kirill
  • 738
  • 10
  • 26
  • 1
    You are seeing the expected behavior. The duplicate shows one workaround. – rmaddy Feb 22 '19 at 01:18
  • @rmaddy Thank you! Are there any cleaner workarounds? – Kirill Feb 22 '19 at 01:25
  • 1
    There shouldn't be a need for any workarounds. Personally, I think it is a bug if you are missing a key in a strings file. That's why you see the key and not a default. Relying on a default makes it harder to notice missing keys. – rmaddy Feb 22 '19 at 02:02
  • Not recommended, but if you want it to work as you mention, you can have key itself as the english string, so if it displays the key, it would be a legit english string. Again, not recommended. – AjinkyaSharma Feb 22 '19 at 06:50

0 Answers0