Created
October 30, 2023 16:18
-
-
Save V-Abhilash-1999/e84547b85302a331d94d9cb94b36df42 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val context = LocalContext.current | |
val newContext = remember(locale) { | |
val res = context.resources | |
val conf = res.configuration | |
conf.setLocale(locale) | |
context.createConfigurationContext(conf) | |
} | |
val okText = remember(newContext) { | |
newContext.resources.getString(android.R.string.ok) | |
} | |
val cancelText = remember(newContext) { | |
newContext.resources.getString(android.R.string.cancel) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment