CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

XZLocalization 1.0.2

XZLocalization 1.0.2

Maintained by Xezun.



  • By
  • Xezun

XZLocalization

CI Status Version License Platform

示例项目 Example

要运行示例项目,请在拉取代码后,先在Pods目录执行pod install命令。

To run the example project, clone the repo, and run pod install from the Pods directory first.

环境需求 Requirements

iOS 12.0, Xcode 14.0

如何安装 Installation

推荐使用 CocoaPods 安装 XZLocalization 组件,在Podfile文件中添加下面这行代码即可。

XZLocalization is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'XZLocalization'

如何使用

1、支持带参数的本地化字符串

XZLocalizedString(@"{0}在{1}去过{2}。", data[@"name"], data[@"date"], data[@"place"])

2、应用内语言切换支持

XZLocalization.isInAppLanguagePreferencesEnabled = YES;
XZLocalization.preferredLanguage = XZAppLanguageEnglish;

Author

Xezun, [email protected]

License

XZLocalization is available under the MIT license. See the LICENSE file for more info.