Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Eeyore741/5d2ce6ce076052797771919a4b4d9877 to your computer and use it in GitHub Desktop.
Save Eeyore741/5d2ce6ce076052797771919a4b4d9877 to your computer and use it in GitHub Desktop.
int count = 0;
NSString *johnsPineapplesCount = nil;
johnsPineapplesCount = NSLocalizedString(@"johns pineapples count", nil);
johnsPineapplesCount = [NSString localizedStringWithFormat:johnsPineapplesCount, count];
//count == 0, johnsPineapplesCount == "У Джона нет ананасов"
//count == 1, johnsPineapplesCount == "У Джона 1 ананас"
//count == 4, johnsPineapplesCount == "У Джона 4 ананаса"
//count == 7, johnsPineapplesCount == "У Джона 7 ананасов"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment