Swift 国际化和本地化框架 Localize-Swift
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/marmelroy/Localize-Swift
- 软件文档: https://github.com/marmelroy/Localize-Swift
软件介绍
Localize-Swift 是一个简单的用于 Swift 应用的国际化和本地化框架,提供了清晰的语法和应用内的多语言切换。
特性
可保留你应用内已经使用的 Localizable.strings 文件
允许用户直接修改应用的语言而无需更改设备语言
使用 .Localized() 替代 NSLocalizedString(key,comment) - 更具 Swifty 语法风格
通过新的 python 脚本 genstrings 来生成你的字符串,可识别 .Localized().
使用方法
在每个 Swift 文件中引入 Localize 用来包含本地化的文本
If Carthage -
import Localize
If CocoaPods -
import Localize_Swift
Add .Localized() following any String object you want translated:
textLabel.text = "Hello World".Localized()
To get an array of available localizations:
Localize.availableLanguages()
To change the current language:
Localize.setCurrentLanguage("fr")To update the UI in the viewcontroller where a language change can take place, observe LCLLanguageChangeNotification :
NSNotificationCenter.defaultCenter().addObserver(self, selector: "setText", name: LCLLanguageChangeNotification, object: nil)
To reset back to the default app language:
Localize.resetCurrentLanaguageToDefault()
Linux/UNIX系统编程手册
Michael Kerrisk / 孙剑 许从年 董健、孙余强 郭光伟 陈舸 / 人民邮电出版社 / 2014-1 / 158
《linux/unix系统编程手册(上、下册)》是介绍linux与unix编程接口的权威著作。linux编程资深专家michael kerrisk在书中详细描述了linux/unix系统编程所涉及的系统调用和库函数,并辅之以全面而清晰的代码示例。《linux/unix系统编程手册(上、下册)》涵盖了逾500个系统调用及库函数,并给出逾200个程序示例,另含88张表格和115幅示意图。 《li......一起来看看 《Linux/UNIX系统编程手册》 这本书的介绍吧!

