• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Localized time estimates?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localized time estimates?


  • Subject: Re: Localized time estimates?
  • From: Maxthon Chan <email@hidden>
  • Date: Fri, 29 Nov 2013 02:08:46 +0800

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 <email@hidden> 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 (email@hidden)
>
> 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:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Localized time estimates? (From: Graham Cox <email@hidden>)

  • Prev by Date: Localized time estimates?
  • Next by Date: Re: Preferences caching?
  • Previous by thread: Localized time estimates?
  • Next by thread: overlapping status bar
  • Index(es):
    • Date
    • Thread