How can I access localized strings for standard iOS system terms (for example, Favorites, More ...)?

I don’t know if my approach to this is fundamentally wrong, but I'm struggling to solve the problem of (seemingly trivial!) Localization.

I want to display the name "System" UITabBarItem (More, Favorites, Recommended, etc.) in the navigation bar. But where to get the string? The MainWindow.nib line file does not contain a line (I did not expect this), and reading the TabBarItem header returns nil, which made me sick.

I was told that there is no way to achieve this, and I just have to add my own localized string for the conditions in question. But I just don’t want (want) to believe it !! This may be quite simple in some languages, but looking up, say, “More”, already gives me a few words in several languages. I am not happy with just sending these words for translation, because it still depends on the translator who knows exactly which term Apple uses. So did I miss something simple here? What are other people doing?

Obviously, installing the system language on my test device and just looking at which headers have tabs is another “obvious” option. But I really have a problem with half-fried workarounds. It will work in most languages, but I will really have fun when it comes to Russian or Japanese.

I am convinced that there must be a more reliable way to do this. Surely there should be a .strings file somewhere in the SDK that defined these lines?

Thanks in advance ... Rich

+7
source share
1 answer

The simple and unsuccessful answer is that in addition to a very small number of standard elements (for example, the "Back" button), you need to localize all the lines yourself. Yes, UIKit has its own Localization.strings file, but it’s obvious that it’s outside the application sandbox, so you don’t have access to it.

I made a mistake with Apple years ago about providing OS level localization for generic button names, tab element labels, etc. This error is still open, but obviously they have not done it yet (sorry, I do not have radar # convenient).

0
source

All Articles