Work big text in SwiftUI

Hello! Can you tell me what is the best way to work with text with more than 1000 characters (application for reference)?



I have a title and body text, I use:

Code Block
let text1 = "title text"
let text2 = """
body text
"""


and its display:

Code Block
VStack {
Text (text1)
.modificator ()
Text (text2)
.modificator ()
}


How can you localize for different countries?
Or are there more correct methods for displaying large text?
Answered by Claude31 in 644377022
What is the problem for large text (you mean more than 1000 chars ?)

I've tested in SwiftUI with 2000, no problem (just need to encapsulate in a scrollView as it may be larger than the screen..

Localization is totally independent issue.
Just use NSLocalizedString and create the translation files in the project:
https://developer.apple.com/forums/thread/650492
Accepted Answer
What is the problem for large text (you mean more than 1000 chars ?)

I've tested in SwiftUI with 2000, no problem (just need to encapsulate in a scrollView as it may be larger than the screen..

Localization is totally independent issue.
Just use NSLocalizedString and create the translation files in the project:
https://developer.apple.com/forums/thread/650492
Work big text in SwiftUI
 
 
Q