0

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.

ST K
  • 69
  • 6
  • 1
    No, you have to supply your own translations. – Paulw11 Mar 27 '23 at 09:20
  • 1
    I have an app where users can switch between 3 languages, and I wrote functions for every case. For example: title: "general_error".localized – NexusUA Mar 27 '23 at 09:21
  • 1
    It is much simpler than creating individual functions for everything, you just need a strings file for each language https://developer.apple.com/localization/ and to make sure your views are pulling from that file – lorem ipsum Mar 27 '23 at 10:22

1 Answers1

1

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.

Geoff Hackworth
  • 2,673
  • 1
  • 16
  • 16