Timeline for Returning a string representation of the number of albums and songs available
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 15, 2015 at 14:53 | comment | added | user140547 | Many times you don't need localization, for sure, but it can also be kept in mind that sometimes you need it. Anyway, Java has already a solution for that kind of problems, as I mentioned in my answer. | |
Jun 15, 2015 at 14:42 | comment | added | Simon Forsberg | @user140547 This was not a question about localization. I never considered localization here. The issue that you raise can be easily fixed though, by for example using different pluralization methods for albums and songs, and read the appropriate strings from a localization file. Perhaps this might be something that you want to implement yourself? Could be an interesting follow-up to this question. | |
Jun 15, 2015 at 14:07 | comment | added | user140547 | Your plurals are hardcoded which hinders localization. Of course, many times you don't need that. But if you do, there are languages for it is not enough to use a single plural. For example, in Czech, the plural form for 2 is different than the one for 5. See en.wikipedia.org/wiki/Czech_declension#Plural_forms | |
Jun 15, 2015 at 13:56 | vote | accept | Davlog | ||
Jun 15, 2015 at 13:53 | history | edited | Simon Forsberg | CC BY-SA 3.0 |
added 471 characters in body
|
Jun 15, 2015 at 13:44 | history | edited | Simon Forsberg | CC BY-SA 3.0 |
edited body
|
Jun 15, 2015 at 13:42 | comment | added | rolfl | I like the way that pluralize can handle other types of plurals, like "mouse" and "mice". It will also be faster than the concatenation. | |
Jun 15, 2015 at 13:35 | history | answered | Simon Forsberg | CC BY-SA 3.0 |