Skip to content

Added string pluralization support example#73

Open
fhasse95 wants to merge 2 commits intoskiptools:mainfrom
fhasse95:String-Pluralization-Support
Open

Added string pluralization support example#73
fhasse95 wants to merge 2 commits intoskiptools:mainfrom
fhasse95:String-Pluralization-Support

Conversation

@fhasse95
Copy link
Contributor

@fhasse95 fhasse95 commented Mar 14, 2026

This PR demonstrates the string pluralization support by extending LocalizationPlayground.swift.

Parent PR:

Notes & Limitations:

  • Specific forms like "few" or "many" will only trigger if the device itself is set to a locale that supports them (e.g., Ukrainian). Consequently, if a string is formatted using a custom locale that requires additional grammatical forms (like in LocalizationPlayground.swift), these may not be correctly applied if the underlying system locale is set to a language like English, which only supports "zero", "one" and "other" (see screenshots below).
  • However, since users typically have their devices set to their native locale, and this behavior is consistent with Apple's documentation for localizedStringWithFormat, I believe this limitation is negligible in practice.

Screenshots:
Device Locale Matching (iOS)
Device Locale Matching iOS

Device Locale Matching (Android):
Device Locale Matching Android

=> Supports all variants

Device Locale Not Matching (iOS):
Device Locale Not Matching iOS

Device Locale Not Matching (Android):
Device Locale Not Matching iOS

=> Supports only "zero", "one" and "other"


Thank you for contributing to the Skip project! Please use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.
    => I used AI assistance while translating the new localized strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant