Giter Site home page Giter Site logo

wqxlanguagemanager's Introduction

WQXLanguageManager

几行代码搞定iOS语言国际化,支持多国语言手动切换。

安装

  1. 打开终端更新本地库:pod repo update --verbose
  2. 在 Podfile 中添加 pod 'WQXLanguageManager'
  3. 执行 pod install

使用

  1. 创建一个名为 WQXLocalizations 的 strings 文件
  2. 点击 WQXLocalizations.strings
  3. 点击 Xcode 右上角的 Inspectors 按钮
  4. 在 Localizations 选项点击 Localize...
  5. 点击项目 -> PROJECT -> Localizations 点击+添加你需要支持的语言
  6. 设置支持的语言: [WQXLanguageManager wqx_setSupportedLanguages:@[@"zh-Hans", @"en", @"ja", @"fr"]];
  7. 设置当前语言: [WQXLanguageManager wqx_setCurrentAppLanguageWithKey:@"zh-Hans"];
  8. 显示文本: label.text = [WQXLanguageManager wqx_localizedStringWithKey:@"hello, world"];

许可证

WQXLanguageManager 使用 MIT 许可证,详情见 LICENSE 文件。

wqxlanguagemanager's People

Contributors

smile-979 avatar

Stargazers

菠萝吹雪xs avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.