0

I am trying to add speech functionality to my app via the UIMenuController, with a custom UIMenuItem. My question is this: If I need to support multiple languages, do I have to define the title of the UIMenuItems in those multiple languages as well? -I have looked everywhere, so this is kinda last resort type stuff :)

-I greatly appreciate any help, and thank you in advance :)

Kaisp
  • 326
  • 2
  • 8

1 Answers1

0

As far as I can see, UIMenuItem title is NSString https://developer.apple.com/library/prerelease/ios/documentation/UIKit/Reference/UIMenuItem_Class/index.html#//apple_ref/occ/instm/UIMenuItem/initWithTitle:action:

so you can use Localized string:

https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/#//apple_ref/occ/clm/NSString/localizedStringWithFormat:

You will have to create localized string where you can put your strings in different languages:

http://www.raywenderlich.com/64401/internationalization-tutorial-for-ios-2014

Miknash
  • 7,888
  • 3
  • 34
  • 46
  • that's what i figured. I had just hoped that there were some way to tap into the device language.. like there is with the native copy: & paste: methods of the UIMenuController.. those titles change automatically according to the chosen device language. -Thank's anyway – Kaisp Oct 01 '15 at 13:51