/*______________
| ______ | U I Z E J A V A S C R I P T F R A M E W O R K
| / / | ---------------------------------------------------
| / O / | MODULE : Uize.Loc.Plurals.Langs.da Package
| / / / |
| / / / /| | ONLINE : http://uize.com
| /____/ /__/_| | COPYRIGHT : (c)2015-2016 UIZE
| /___ | LICENSE : Available under MIT License or GNU General Public License
|_______________| http://uize.com/license.html
*/
/* Module Meta Data
type: Package
importance: 1
codeCompleteness: 100
docCompleteness: 100
*/
/*?
Introduction
The =Uize.Loc.Plurals.Langs.da= module implements a feature for determining a plural category from a number value for the da language.
*DEVELOPERS:* `Chris van Rensburg`
Plural Categories
........................................................
<< table >>
title: Plural Categories
data:
:| Category | Rule |
:| one | n = 1 or t != 0 and i = 0,1 @integer 1 @decimal 0.1~1.6 |
:| other | @integer 0, 2~16, 100, 1000, 10000, 100000, 1000000, … @decimal 0.0, 2.0~3.4, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, … |
........................................................
*/
Uize.module ({
name:'Uize.Loc.Plurals.Langs.da',
required:'Uize.Loc.Plurals.Util',
builder:function () {
'use strict';
return Uize.package ({
getPluralCategory:function (_value) {
return Uize.Loc.Plurals.Util.getPluralCategory (
_value,
function (n,i,f,t,v,w,within) {
return n == 1 || t != 0 && within (i,[0,1]) ? 'one' : 'other';
}
);
}
});
}
});