Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在SwiftUI中使用超链接实现本地化文本_Ios_Xcode_Localization_Swiftui - Fatal编程技术网

Ios 如何在SwiftUI中使用超链接实现本地化文本

Ios 如何在SwiftUI中使用超链接实现本地化文本,ios,xcode,localization,swiftui,Ios,Xcode,Localization,Swiftui,我有如下内容。我想通过本地化字符串实现它 import SwiftUI struct ContentView: View { var body: some View { VStack { Text("By signing in, you agree to the ") HStack(spacing: 0) { Button("privacy policy&quo

我有如下内容。我想通过本地化字符串实现它

import SwiftUI

struct ContentView: View {
    var body: some View {
        VStack {
            Text("By signing in, you agree to the ")
            HStack(spacing: 0) {
                Button("privacy policy") {}
                Text(" and ")
                Button("terms of service") {}
                Text(".")
            }
        }
    }
}
是否有一种实现方法,如:

"bySignIn %@ and %@." = "By signing in, you agree to the %@ and %@.";

你有什么建议吗

"bySignIn %@ and %@." = "By signing in, you agree to the Button(%@) and Button(%@).";