Is there an easy way to convert the number 1, 2, 3, ... to "1st", "2nd", "3rd", ..., and in such a way that I can give the function a language and have it return me the correct form for the language I'm targeting? Either standard C++ (stl or boost OK), MFC or ATL, win32 api or a small, single-purpose and free library that I can download from somewhere. Thanks.
I doubt whether it is possible at all, since in many languages this form will depend on the context, like gender or case of the noun it describes and different languages will require different kind of context information to allow to determine the correct form.
EDIT: E.g. in Polish it is "5-ta klasa" (5th class) vs. "5-ty miesiąc" (5th month) vs. "w 5-tym miesiącu" (in the 5th month).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With