Stringboot provides multiple ways to access your strings, depending on your UI framework.
XML Layouts (Declarative)
For traditional Android Views, you can use theandroid:tag attribute to bind a view to a string key.
1
Add Tag
Add the
android:tag attribute to your TextView:2
Apply Tags
Call
applyStringbootTags() in your Activity or Fragment:Kotlin (Programmatic)
You can fetch strings programmatically usingStringProvider.
Suspend Function
Useget() inside a coroutine for one-off fetching:
Reactive Flow
UsegetFlow() to automatically update the UI when the string changes (e.g., language switch or remote update):
Jetpack Compose
For Jetpack Compose, use therememberStringboot state or StringbootText composable (if available in your version).
Changing Language
To switch the language of the app at runtime:StringProvider.setLocale updates the internal state. Reactive flows (Compose/Flow) will update automatically. For XML views, you must call applyStringbootTags() again.