Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Locale? #19

Open
chrux opened this issue May 25, 2014 · 2 comments
Open

Support for Locale? #19

chrux opened this issue May 25, 2014 · 2 comments

Comments

@chrux
Copy link

chrux commented May 25, 2014

Is there any plan to support more language, like spanish?

@billymeltdown
Copy link
Owner

Hi @chrux I'm sorry I didn't write back to your request sooner, I must have missed it. NSLocalizedString() is being used for a couple of the few raw strings in this category, there's also some prefixes in there that need to be adjusted, specifically:

https://github.com/billymeltdown/nsdate-helper/blob/master/NSDate%2BHelper.m#L114
https://github.com/billymeltdown/nsdate-helper/blob/master/NSDate%2BHelper.m#L230

Otherwise, you should be able to use this category with a translation now, the two strings localized being "Yesterday" and "Today." Dates are otherwise formatted based on the user's currentCalendar, which takes locale into account.

@chrux
Copy link
Author

chrux commented Apr 21, 2015

Yeah, you're right, just one improvement to this line

text = [NSString stringWithFormat:@"%ld days ago", (NSInteger)daysAgo];

Maybe "days ago" should use "NSLocalizedString" too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants