Smartling / ios-i18n

The ios-i18n library provides seamless integration of plurals into iOS 6 apps.
http://www.smartling.com
Apache License 2.0
205 stars 41 forks source link

Library does not work with table names #5

Closed michal-imo closed 11 years ago

michal-imo commented 11 years ago

The function pluralizedStringWithKey:defaultValue:table:pluralValue: expects the parameter "table" to be a path to file with translations. Instead, it should behave as with Localizable.string file (default case) - the right file path is chosen depending on the locale.

paiv commented 11 years ago

You can pass nil value as a table name for default behavior. NSString *s = [[NSBundle mainBundle] pluralizedStringWithKey:key defaultValue:@"" table:nil pluralValue:2];

paiv commented 11 years ago

@michal-imo, You should be using macro SLPluralizedString(key, n, comment) Can I ask why do you use pluralizedStringWithKey:... method directly? Do you have issues with SLPluralizedString macro?

michal-imo commented 11 years ago

I do not use it directly. I want to use SLPluralizedStringFromTable because I have pluralized strings in a separate .strings file. That macro calls pluralizedStringWithKey:... method in the end.

paiv commented 11 years ago

Got it now. Thank you for reporting.