Skip to content

A Sample for stringsdict. And "99 Bottles of Beer on the Wall" in Russian

License

Notifications You must be signed in to change notification settings

below/PluralLoc

Repository files navigation

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:

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 worng 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:

  • Chinese (simplified)
  • English
  • French
  • German
  • Polish
  • Romanian
  • Russian
  • Ukrainian

You 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

About

A Sample for stringsdict. And "99 Bottles of Beer on the Wall" in Russian

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages