Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6920593
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:10:02+00:00 2026-05-27T10:10:02+00:00

In Objective C, is there any way to format an integer to ordinals 1

  • 0

In Objective C, is there any way to format an integer to ordinals
1 => “1st”, 2 => “2nd” etc… that works for any language?
So if the user is French he will see “1er”, “2ieme” etc..

Thanks a lot!

Edit:
This is for an iOs app

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:10:03+00:00Added an answer on May 27, 2026 at 10:10 am

    Have you taken a look at TTTOrdinalNumberFormatter which is in FormatterKit? It works great, and I’m pretty sure it’s exactly what you’re looking for.


    Here’s an example taken from the kit:

    TTTOrdinalNumberFormatter *ordinalNumberFormatter = [[TTTOrdinalNumberFormatter alloc] init];
    [ordinalNumberFormatter setLocale:[NSLocale currentLocale]];
    [ordinalNumberFormatter setGrammaticalGender:TTTOrdinalNumberFormatterMaleGender];
    NSNumber *number = [NSNumber numberWithInteger:2];
    NSLog(@"%@", [NSString stringWithFormat:NSLocalizedString(@"You came in %@ place!", nil), [ordinalNumberFormatter stringFromNumber:number]]);
    

    Assuming you’ve provided localized strings for “You came in %@ place!”, the output would be:

    * English: "You came in 2nd place!"
    * French: "Vous êtes venu à la 2eme place!"
    * Spanish: "Usted llegó en 2.o lugar!"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to use global int constants in Objective C that work
Are there any generally-accepted coding standards (naming, casting etc) that apply specifically to iPhone/Cocoa/Objective-C?
Is there any way to have a Shortcut Recorder in Objective-C, where the user
Is there any way to make it so that the user cannot swipe-to-delete items?
Is there any way to create a property like this C# property in Objective-C?
Possible Duplicate: Objective C for Windows iPhone development on Windows Is there any way
I'm a beginner with Objective C and iPhone development. It's there any way to
Is there any simple way how to initialize String in Objective-C with int such
Are there any packages that can take a directory full of source code (Objective-C
Is there any way I can test if a method exists in Objective-C? I'm

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.