Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/LOCALIZATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to add some logging here, but there's no logging mechanism in the library currently.

}
}

Expand Down