compose-multiplatform
compose-multiplatform copied to clipboard
overridable resource locale
Add a way to override local for the resources (partially address #4197).
Similar to how we override the density with the LocalDensity composition provider it adds LocalResourceLocale to override Locale for Resource.
Usage
CompositionLocalProvider(LocalResourceLocale provides Locale("np")) {
Text(stringResource(Res.string.hello))
}
@terrakok, can you review this, please?
Will this be available in 1.6.10?
Will this be available in 1.6.10?
No
@terrakok @MatkovIvan Are there any possible issues this change might cause? If not, it would great to have the possibility to handle the app language in Compose. I would be more than happy to help move this forward.
The feature should be implemented in the core/runtime modules, not in the library. Because it is a more general thing. You may track the progress here: https://github.com/JetBrains/compose-multiplatform/issues/4347 Sorry for the long reply