ZPPLocalizable
Requirements
支持简体中文/繁体香港/繁体台湾/韩文/英文
语言切换 - 监听宏
#define KLanguagesWillChangeNotif @"KLanguagesWillChangeNotif"
//将要切换
#define KLanguagesDidChangeNotif @"KLanguagesDidChangeNotif"
// 语言已经切换
加载多语言字符串
key:国际化Key
#define FXLocalizedString(key)[FXLocalizableTools Localizable:key]
key:国际化Key tbl:加载特定国际化文件名
#define FXLocalizedStringFromTable(key,tbl)[FXLocalizableTools Localizable:key tbl:tbl]
切换语言
#define FXLocalizedChangeLanguages(LOCATIONLANAGESTYPE) [FXLocalizableTools LocalizableChangeLanguages:LOCATIONLANAGESTYPE]
/**未知语言*/
LOCATIONLANAGESTYPE_Other,
/**简体中文*/
LOCATIONLANAGESTYPE_zh_Hans,
/**繁体中文 台湾*/
LOCATIONLANAGESTYPE_zh_Hant_TW,
/**繁体中文 香港*/
LOCATIONLANAGESTYPE_zh_Hant_HK,
/**英文*/
LOCATIONLANAGESTYPE_EN,
/**韩文*/
LOCATIONLANAGESTYPE_KO
获取当前语言
+ (LOCATIONLANAGESTYPE)currentLanages;
+ (NSString *)currentLanguageCode:(LOCATIONLANAGESTYPE)labType;
+ (NSString *)currentLanagesDetaile:(LOCATIONLANAGESTYPE)labTypeq;
Installation
ZPPLocalizable is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'ZPPLocalizable'
Author
ZPP 944160330@qq.com
License
ZPPLocalizable is available under the MIT license. See the LICENSE file for more info.
语言包格式检查正则表达式:(水平有限正则只能写到这了)
([\w"]"[\w-\s\\]+")|(\w\s+"+[\w\s]+")| (\\+\s+"+[\w]+\s+\\+")
匹配到的不合法字符串
网友评论