https://github.com/below/pluralloc
A Sample for stringsdict. And "99 Bottles of Beer on the Wall" in Russian
https://github.com/below/pluralloc
beer ios localization swift
Last synced: 29 days ago
JSON representation
A Sample for stringsdict. And "99 Bottles of Beer on the Wall" in Russian
- Host: GitHub
- URL: https://github.com/below/pluralloc
- Owner: below
- License: mit
- Created: 2019-10-08T20:53:54.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-09-18T19:29:56.000Z (8 months ago)
- Last Synced: 2025-03-27T06:34:42.830Z (about 2 months ago)
- Topics: beer, ios, localization, swift
- Language: Swift
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PluralLoc
A Sample on how to localize plural strings in iOS. And "99 Bottles of Beer on the Wall" in Russian.## Background
Today, in a code review I again saw something like this:
```swift
if number > 1 {
// use plural
} else {
// use singular
}
```**Don't do that**
I am not sure if it was correct for the native language of the developer, it is wrong in most languages. But to the rescue, Apple provides a system to localize your plural forms, and this project is a sample for it.
## Supported Languages
Currently, the following languages have been [implemented](Plural%20Loc/Localizable.xcstrings):
- [x] Chinese (simplified)
- [x] English
- [x] Dutch
- [x] French
- [x] German
- [x] Polish
- [x] Romanian
- [x] Russian
- [x] UkrainianYou are more than welcome to create a pull request for your language.
P.S.: The Swift Playground contains the swift version of the "99 Bottles Of Beer" algorithm in Russian
Слава Україні 🇺🇦 [Support Ukraine](https://war.ukraine.ua/support-ukraine/)