get String
Replace your context.getString() with this function.
getString(context, R.strings.hello, "World", Locale("es"))
getString(context, R.strings.name)Content copied to clipboard
Return
A String containing the translated text.
Parameters
context
The context. Could be Application Context.
id
The resource ID of the string to translate.
format Args
optional parameters if your resource string takes parameters like "Hello $1%s"