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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

Would love to see this merged. :)

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

4 participants