kikito / i18n.lua

A very complete i18n lib for Lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Negative numbers do exist

kikito opened this issue · comments

The pluralization rules simply assign "other" to those. That might be worth checking.

Just sent the following to the unicode group:

Hello Unicode Consortium,

I have an enquiry regarding your Language Plural Rules table:

http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html

First of all, let me thank you for putting it online. It has helped me immensely when developing internationalization tools.

My enquiry is related with the fact that the aforementioned table doesn't mention negative numbers. These are needed in some cases - i.e. for generating messages such as "Temperature: -2 degrees". I can see 3 different ways of handling this:

a) I can assume that whatever rules apply to positive numbers apply to negative ones too. So if a language has a rule for "one", I use it for both 1 and -1. In other words, I use the absolute of n to determine the correct plural form.
b) It could happen that all languages use the 'other' form for negative numbers.
c) There are specific rules for negative numbers (some languages might do a), some might do b), and some might have different rules for negative numbers) but they are missing from the spec.

Please let me know which one is the correct option.

Thanks a lot,

Enrique García Cota

Well, I have decided to close down this issue, and just do a math.abs instead.