Does my Base Internationalization storyboard have to correspond to a fallback language for all unlocalized languages and strings?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 01:26:30

In my case, XCode 5 didn't create a en.lproj/myStoryboard.strings, there's only the original storyboard in the Base.lproj folder. Maybe it's an old XCode issue?

Try to remove that file and see if your app gets along with Base.lproj for default, English strings.

Your Info.plist file should have an entry Localization native development region, which points to the lproj folder to be used in case the required string doesn't exist in the preferred language.

I'm not sure about this, but I think you have to use en and UI with a Base.lproj would automatically fallback to Base.lproj.

Does that help you in any way?

  1. So my questions are if the user will ever see the strings in the Base.lproj/myStoryboard.storyboard?

It is the default to use those strings for the development region localization, which is typically English. If there was a matching strings file for english, it would supersede the strings in the storyboard. This is typically redundant, so it isn't normally used. If you really want all of your languages to be handled identically, you can do this.

Do the strings in that file have to be the default strings that are shown to the user if the system cannot find the user's preferred language folder in my bundle?

These are unrelated concepts. The strings embedded in the storyboard are equivalent to having ones in en.lproj. After that, language fallback works the same as without Base.lproj.

Can I explicitly say "never use Base.lproj/myStoryboard.storyboard, always fall back on en.lproj/myStoryboard.strings"?

If you have en.lproj/myStoryboard.strings, and english is the development language, they will always superseded the strings embedded in Base.lproj/myStoryboard.storyboard for English. Including when English isn't the preferred language, but ends up being chosen as the fallback language.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!