NSDate-TimeAgo
NSDate-TimeAgo copied to clipboard
Pluralization dont work because wrong RU locale code
https://github.com/kevinlawler/NSDate-TimeAgo/blob/master/NSDate%2BTimeAgo.m#L366 but locale code is "ru-RU"
What is a good way to check locale? Starts with "ru" or simple:
if([localeCode isEqual:@"ru"] || [localeCode isEqualToString:@"ru-RU"]) {
?
I think you are right. SO answer has interesting comment related to this issue: http://stackoverflow.com/questions/3910244/getting-current-device-language-in-ios#comment19209319_4221416
Comment advices to do:
NSString * localeCode = [[[NSLocale preferredLanguages] objectAtIndex:0] substringToIndex:2]