Skip to content

Commit

Permalink
Added hindi language pluralisation rule to index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
anirudh-hegde authored and actions-user committed Dec 2, 2023
1 parent c310b0b commit 6ca76c9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ var defaultPluralRules = {
if (n === 1) { return 0; }
return (n >= 2 && n <= 4) ? 1 : 2;
},
hindi: function (n) {
if(n==1){ return 1; }
else if(n==2){ return 2; }
if(n>=3 && n<=4){ return 3; }
else { return 4; }
},
polish: function (n) {
if (n === 1) { return 0; }
var end = n % 10;
Expand Down Expand Up @@ -106,6 +112,7 @@ var defaultPluralRules = {
chinese: ['id', 'id-ID', 'ja', 'ko', 'ko-KR', 'lo', 'ms', 'th', 'th-TH', 'zh'],
croatian: ['hr', 'hr-HR'],
german: ['fa', 'da', 'de', 'en', 'es', 'fi', 'el', 'he', 'hi-IN', 'hu', 'hu-HU', 'it', 'nl', 'no', 'pt', 'sv', 'tr'],
hindi: ['hi', 'hi-IN'],
french: ['fr', 'tl', 'pt-br'],
russian: ['ru', 'ru-RU'],
lithuanian: ['lt'],
Expand Down

0 comments on commit 6ca76c9

Please sign in to comment.