aarti
aarti

Reputation: 2865

Adding localized string to UITextView in swift

I am following the instructions on this blog post to localize my swift app. http://evgenii.com/blog/localizing-text-in-swift/

In my Swift file I have

    let my_interests = "Reading: Children's books, biographies, history and science fiction.\n\nProgramming Languages: Learning new programming languages."   
   ....
    textView.text = NSLocalizedString("my_interests", comment: "Just a Test")

When I go to the Editor and select Export For Localization enter image description here

I get an error.enter image description here

Upvotes: 0

Views: 505

Answers (1)

Gerd Castan
Gerd Castan

Reputation: 6849

You probably don't have a Localizable.strings in your project.

In your XCode project go to File -> New -> File -> iOS -> Resource -> Strings.file -> Next

Name the file Localizable.strings

Upvotes: 1

Related Questions