Commit 06063230 authored by Steven杜宇's avatar Steven杜宇

/// 国际化

parent f58d6881
...@@ -19,7 +19,7 @@ class YHAboutUsViewController: YHBaseViewController { ...@@ -19,7 +19,7 @@ class YHAboutUsViewController: YHBaseViewController {
lazy var items = { lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "ABC".yhlocalized(), detail: "大数据精准匹配,专属方案获批率更高"), return [AboutAdvantageItem(iconName: "about_match", title: "ABC".local, detail: "大数据精准匹配,专属方案获批率更高"),
AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求"), AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求"),
AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持"), AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持"),
AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上"), AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上"),
...@@ -51,7 +51,7 @@ class YHAboutUsViewController: YHBaseViewController { ...@@ -51,7 +51,7 @@ class YHAboutUsViewController: YHBaseViewController {
lazy var aboutLabel = { lazy var aboutLabel = {
var label = UILabel() var label = UILabel()
label.text = "关于银河".yhlocalized() label.text = "关于银河".local
label.textColor = UIColor(hexString:"#222222") label.textColor = UIColor(hexString:"#222222")
label.textAlignment = NSTextAlignment.left label.textAlignment = NSTextAlignment.left
label.font = UIFont.systemFont(ofSize: 20) label.font = UIFont.systemFont(ofSize: 20)
...@@ -101,6 +101,7 @@ class YHAboutUsViewController: YHBaseViewController { ...@@ -101,6 +101,7 @@ class YHAboutUsViewController: YHBaseViewController {
func setupUI() { func setupUI() {
self.title = "关于我们" self.title = "关于我们"
view.backgroundColor = .white view.backgroundColor = .white
......
...@@ -114,7 +114,7 @@ public extension String { ...@@ -114,7 +114,7 @@ public extension String {
/** /**
* Utility method for getting localized value * Utility method for getting localized value
*/ */
func yhlocalized() -> String { var local: String {
return YHLocalizable.shared.currentBundle().localizedString(forKey: self, value: nil, table: nil) return YHLocalizable.shared.currentBundle().localizedString(forKey: self, value: nil, table: nil)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment