Attributed String / Text in SwiftUI

Currently using Attributed String in Foundation we could have several text stylings in a long string by using something like this:
Code Block
attributedSentence.setAttributes(redTextAttributes, range: NSRange(location: 0, length: 3))

How do we achieve this in SwiftUI?
Yes we can concat string like this
Code Block
Text("Hi there").foregroundColor(.red) + Text("how are you"?).foregroundColor(.blue)

But this static approach is not possible if we apply localisation in our app. Each language have different grammar which leads to different word structure.
How could we have a consistent "Hi there" in red color regardless of it's language?

bump. we need attributed strings in swiftui !
The following should work:
Code Block
Text("\(Text("Hi there").foregroundColor(.red)) how are you?").foregroundColor(.blue)

It will add the full text "Hi there how are you?" in the .strings file. It will also add "Hi there" as a separate entry, but I don't think there's a way around that, unfortunately.
Attributed String / Text in SwiftUI
 
 
Q