-
Notifications
You must be signed in to change notification settings - Fork 68
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
Localization problem time string change locale without config. #10
Comments
Indeed, it is weird. I fixed some issues with the localized strings in the last version (0.4.1). Can you try with this version? |
@yannickl Sorry my fault, I tell you the wrong version. Currently, I use YLMoment (0.4.0). I install it via Cocoapods Before: [[NSBundle mainBundle] preferredLocalizations] // --> en |
@giver Are you using Cocoapods or have you installed the library manually? What happens if you manually set the locale? E.g. |
Not working [[YLMoment proxy] setLocale:[NSLocale localeWithLocaleIdentifier:@"en_US"]];
YLMoment *moment = [YLMoment momentWithDateAsString:time format:@"yyyy-MM-dd'T'HH:mm:ssZZZZZ"];
_timeLabel.text = [moment fromNow]; Working code (I must specific locale) YLMoment *moment = [YLMoment momentWithDateAsString:time format:@"yyyy-MM-dd'T'HH:mm:ssZZZZZ" localeIdentifier:@"en_US"]; |
@giver I'll do some test tonight to see if I can find the prob. |
@giver I updated the code. Can you tell me if everything is ok now please? |
@yannickl It doesn't work. I'm not sure if there is some code or environment configuration that make the things mess up. |
@giver Very strange, the test on my local configuration works. Is it possible to have a sample project which reproduce the issue? |
Before update to 0.3.0, I think my locale default with 'en' but after update to 0.3.0 my locale was automatic change to 'de' (I notice by the string it was produced). I don't know why. Because I never touch the localization setting in my app before.
The text was updated successfully, but these errors were encountered: