Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchKit how to create custom Localizable.strings file?

I created for the interface.storyboard at the WatchKit App the following files, by activating Localisation:

enter image description here

In the IOS App I also have the Localisable.strings files where I put all my custom words for the specific language (but I can not remember how I created it or if it was created automatically):

enter image description here

How can I create the Localizable.strings file at the WatchKit App and tell the WatchKit App to use that file?

At the moment

myLabel = NSLocalizedString(@"msgMylabel", @"");

displays msgMylabel and not the content of msgMylabel

Interface.strings (English) "msgMylabel" = "my label";

Interface.strings (German) "msgMylabel" = "mein Label";

like image 327
Ing. Ron Avatar asked Mar 30 '15 21:03

Ing. Ron


1 Answers

I found the answer:

I had to add the WatchKit Extension (not WatchKit App) as Target Membership for Localizable.strings (English) and Localizable.strings (German).

like image 98
Ing. Ron Avatar answered Oct 26 '22 23:10

Ing. Ron