I’d usually go with this:

MSSTR(NSLocalizedString(@“ui.approxTimeFormat”, nil), 
MSLocalizedTimeInterval(timeInterval))

In en_US it expands:

ui.approxTimeFormat = “Approx. %@“

In zh_CN:

ui.approxTimeFormat = “大约 %@后“

Note: MSSTR(...) is a macro expands to [NSString stringWithFormat:__VA_ARGS__] 
to save space, and I have a habit of using code-like localisation keys, you can 
find an alternative implementation in my MSBooster library (and hence the 
prefix). The MSLocalizedTimeInterval turns a time interval into its localised 
human-friendly version.

On Nov 29, 2013, at 1:31, Graham Cox <graham....@bigpond.com> wrote:

> I’m fairly sure the answer’s no, but is there any way to get a localized 
> time-estimate string, given a NSTimeInterval? e.g. “about 10 seconds”, etc 
> for progress indicators and the like.
> 
> —Graham
> 
> 
> 
> _______________________________________________
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/xcvista%40me.com
> 
> This email sent to xcvi...@me.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to