[英]Adding localized string to UITextView in swift
我正在按照此博客文章上的說明本地化我的Swift應用。 http://evgenii.com/blog/localizing-text-in-swift/
在我的Swift文件中
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")
當我進入編輯器並選擇“導出以進行本地化”時
我得到一個錯誤。
您的項目中可能沒有Localizable.strings。
在您的XCode項目中,轉到File-> New-> File-> iOS-> Resource-> Strings.file-> Next
將文件命名為Localizable.strings
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.