2016年7月21日 星期四

[swift] How to make Localizable in SWIFT APP



1.Open Xcode and click  File->New->Project

2.Create a new project and choose Single View Application.



3.Input "Localizable" as app name


4. On "Localizable" app name , right click  and choose New File.



5. click "Resource" , "Strings File"

6. input "Localizable.strings" as file name


7.click "Localize


8. please choose "Base" and click "Localize"


9.To find "info" of "Localizations", and click add "+"


10. choose your language to your app


11. choose "Localizable.strings", and click "Finish"


12. You will have two files called "Localizable.strings"



13. at "Localizable.strings(Base)" input "test='TEST';"



14. at "Localizable.strings(Chinese)" input "test='測試';"


15. How to use

NSLocalizedString("test", comment: "")









1 則留言: