Search code examples
iosswiftnslocalizedstringlocalizedstringkey

Is there any way to get localizations from iOS?


If I show an alert without any buttons, a default button is "OK". In Korean iOS it is "확인" and in Japanese it is "OK" as well.

So if I can refer localizations from iOS, it's much easier to translate my app. If not, I have to translate every my custom "OK" buttons and so on.

It seems there is no such way to do like this, but if there is I wanna ask you how to refer any strings or any localizations from iOS.


Solution

  • There is not a way to programmatically find the translations that iOS uses for standard components (ok, save, cancel buttons and so on). You will need to use the localised string methods and provide your own translations.

    kishikawa katsumi has written a tool which extracts localisations from inside Apple frameworks and made them available on a website: https://applelocalization.com/ You can choose which languages to show results for and search for strings. It seems that even Apple is not always consistent in the translations they use in different frameworks for the same words or phrases.