Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

overridable resource locale #4703

Closed
wants to merge 1 commit into from
Closed

Conversation

psuzn
Copy link

@psuzn psuzn commented Apr 26, 2024

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))
}

@psuzn
Copy link
Author

psuzn commented May 2, 2024

@terrakok, can you review this, please?

@toaster217
Copy link

Will this be available in 1.6.10?

@MatkovIvan
Copy link
Member

Will this be available in 1.6.10?

No

@kaidotarma
Copy link

@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.

@terrakok
Copy link
Collaborator

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: #4347
Sorry for the long reply

@terrakok terrakok closed this Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants