|
|
|
@ -42,8 +42,9 @@ fun pluralStringResource(resource: PluralStringResource, quantity: Int): String
|
|
|
|
|
* |
|
|
|
|
* @throws IllegalArgumentException If the provided ID or the pluralization is not found in the resource file. |
|
|
|
|
*/ |
|
|
|
|
@OptIn(ExperimentalResourceApi::class) |
|
|
|
|
suspend fun getPluralString(resource: PluralStringResource, quantity: Int): String = |
|
|
|
|
loadPluralString(resource, quantity, DefaultResourceReader, getResourceEnvironment()) |
|
|
|
|
loadPluralString(resource, quantity, DefaultResourceReader, getSystemResourceEnvironment()) |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* Loads a string using the specified string resource. |
|
|
|
@ -110,12 +111,13 @@ fun pluralStringResource(resource: PluralStringResource, quantity: Int, vararg f
|
|
|
|
|
* |
|
|
|
|
* @throws IllegalArgumentException If the provided ID or the pluralization is not found in the resource file. |
|
|
|
|
*/ |
|
|
|
|
@OptIn(ExperimentalResourceApi::class) |
|
|
|
|
suspend fun getPluralString(resource: PluralStringResource, quantity: Int, vararg formatArgs: Any): String = |
|
|
|
|
loadPluralString( |
|
|
|
|
resource, quantity, |
|
|
|
|
formatArgs.map { it.toString() }, |
|
|
|
|
DefaultResourceReader, |
|
|
|
|
getResourceEnvironment(), |
|
|
|
|
getSystemResourceEnvironment(), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|