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

  • SEARCH
  • Home
  • 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 680793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:24:42+00:00 2026-05-14T01:24:42+00:00

for ($rank=0; $rank<100; $rank++) { printf(Your rank: %d%s, $rank, $suffix); } Does there exist

  • 0

for ($rank=0; $rank<100; $rank++)
{
printf(“Your rank: %d%s”, $rank, $suffix);
}

Does there exist a gettext function to localize $suffix to the current language and return, for example:

Your rank: 0th
Your rank: 1st
Your rank: 2nd
Your rank: 3rd
Your rank: 4th

if the current locale is English, and whatever the correct “ordinal” forms of numbers are in other languages when the locale is set to something else?

Thank you.

  • 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-14T01:24:43+00:00Added an answer on May 14, 2026 at 1:24 am

    Not that I know of, but you can use NumberFormatter

    $nf = new NumberFormatter('en_US', NumberFormatter::ORDINAL);
    print $nf->format(123); // prints 123rd
    

    Source:

    • Internationalization in PHP 5.3
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

****Update:** using the Rank() over partition syntax available in MS SQL Server 2005 does
I'm trying to sum a column with rank function and group by month, my
This is linked to my previous Qn Table A: ID Rank Name 1 100
Given a table structure with name and rank columns, with the possibility of there
I tried to order csv file but the rank() function acting weird on number
I'd like to rank a collection of landscape images by making a game whereby
I am a rank beginner in C#. I am currently using this code: objGraphics.Clear(SystemColors.Control);
I would like to rank sequential rows with the null value inside a group
In which SQL standard was RANK() first introduced? List of SQL standards: SQL-86 SQL-89
I want to get the page rank for any website. I have tried many

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.