diff --git a/docs/LOCALIZATION.md b/docs/LOCALIZATION.md index f7e9d49..8f61df4 100644 --- a/docs/LOCALIZATION.md +++ b/docs/LOCALIZATION.md @@ -44,6 +44,8 @@ in JVM 3rd-party library is used. But in Apple this API is closed and in JS it's so to avoid burdening the library with heavy solutions, "out of the box" only rules are provided for [some languages](../libres-core/src/appleAndJsMain/kotlin/io/github/skeptick/libres/strings/PluralRules.kt). +If there are no rules provided for a language, the library falls back to the English rules. + You can create a Pull Request with the required languages or define these values at runtime: ```kotlin diff --git a/libres-core/src/appleAndJsMain/kotlin/io/github/skeptick/libres/strings/PluralRules.kt b/libres-core/src/appleAndJsMain/kotlin/io/github/skeptick/libres/strings/PluralRules.kt index c746c14..2d182ca 100644 --- a/libres-core/src/appleAndJsMain/kotlin/io/github/skeptick/libres/strings/PluralRules.kt +++ b/libres-core/src/appleAndJsMain/kotlin/io/github/skeptick/libres/strings/PluralRules.kt @@ -73,7 +73,7 @@ object PluralRules { "uk" -> Ukrainian "kk" -> Kazakh "fr" -> French - else -> custom[languageCode] ?: error("Plural rule for '$languageCode' not provided") + else -> custom[languageCode] ?: English } }