在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Abedalkareem/LanguageManager-iOS开源软件地址:https://github.com/Abedalkareem/LanguageManager-iOS开源编程语言:Swift 92.0%开源软件介绍:A Language manager to handle changing app language without restarting the app. ScreenShotsLanguageManager-SwiftUIFor SwiftUI please visit the LanguageManager-SwiftUI UsageYoutube: iOS - Support multiple languages (Localization). First of all, remember to add the After that in the `didFinishLaunchingWithOptions` method inside the `AppDelegate.swift` file, set your default language that your app will run first time LanguageManager.shared.defaultLanguage = .en // you can use .deviceLanguage to keep the device default language. If you want to change the language use the @IBAction func changeLanguage(_ sender: UIButton) {
let selectedLanguage: Languages = sender.tag == 1 ? .en : .ar
// change the language
LanguageManager.shared.setLanguage(language: selectedLanguage)
{ title -> UIViewController in
let storyboard = UIStoryboard(name: "Main", bundle: nil)
// the view controller that you want to show after changing the language
return storyboard.instantiateInitialViewController()!
} animation: { view in
// do custom animation
view.transform = CGAffineTransform(scaleX: 2, y: 2)
view.alpha = 0
}
} If you have an image and you want to change the direction of the image depending on the language, you can use image direction property, the property can be one of the following values: - - - Please check the example project to see how it works. InstallationLanguageManager-iOS is available through CocoaPods. To install it, simply add the following line to your Podfile: pod 'LanguageManager-iOS' Or you can use Carthage.
You can also use Swift Package Manager. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论