Swift : How to change language inside app?

前端 未结 6 1516
忘了有多久
忘了有多久 2020-12-31 19:31

i am using Localize-Swift library (Link) to localize my application and it works fine with .strings files. the problem is that i have to localize to a language

6条回答
  •  说谎
    说谎 (楼主)
    2020-12-31 20:13

    Maybe the RSMultiLanguage pod is something useful for you? I have used it in my apps and it provides to possibility to change the user language in app. I'm pretty sure you can set it depending on the user location with an if loop. That way you might not have to restart the app.

    RSMultiLanguage

    Usage

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

    Installation

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

    pod "RSMultiLanguage"
    

    Author

    Roy Ng, roytornado@gmail.com

    License

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

提交回复
热议问题