Here's a 2025 solution to this very common problem.
Check out this lib, [TextResource](https://github.com/dkmarkell/textresource). You can build your strings in the viewmodel (without holding a context) and resolve them in the UI, which will preserve localization
Example
```
// ViewModel
val title = TextResource.simple(R.string.greeting, userName) // expose via Flow or LiveData
// Compose
Text(title.resolveString())
// Views
textView.text = title.resolveString(context)
```
Check out this lib, [TextResource](https://github.com/dkmarkell/textresource). You can build your strings in the viewmodel (without holding a context) and resolve them in the UI, which will preserve localization
Example
```
// ViewModel
val title = TextResource.simple(R.string.greeting, userName) // expose via Flow or LiveData
// Compose
Text(title.resolveString())
// Views
textView.text = title.resolveString(context)
```