Home | History | Annotate | Line # | Download | only in src
      1 /* Table of known plural form expressions.
      2    Copyright (C) 2001-2006 Free Software Foundation, Inc.
      3    Written by Bruno Haible <haible (at) clisp.cons.org>, 2002.
      4 
      5    This program is free software; you can redistribute it and/or modify
      6    it under the terms of the GNU General Public License as published by
      7    the Free Software Foundation; either version 2, or (at your option)
      8    any later version.
      9 
     10    This program is distributed in the hope that it will be useful,
     11    but WITHOUT ANY WARRANTY; without even the implied warranty of
     12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     13    GNU General Public License for more details.
     14 
     15    You should have received a copy of the GNU General Public License
     16    along with this program; if not, write to the Free Software Foundation,
     17    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
     18 
     19 #ifdef HAVE_CONFIG_H
     20 # include "config.h"
     21 #endif
     22 
     23 /* Specification.  */
     24 #include "plural-table.h"
     25 
     26 /* Formulas taken from the documentation, node "Plural forms".  */
     27 struct plural_table_entry plural_table[] =
     28   {
     29     { "ja", "Japanese",          "nplurals=1; plural=0;" },
     30     { "ko", "Korean",            "nplurals=1; plural=0;" },
     31     { "vi", "Vietnamese",        "nplurals=1; plural=0;" },
     32     { "tr", "Turkish",           "nplurals=1; plural=0;" },
     33     { "da", "Danish",            "nplurals=2; plural=(n != 1);" },
     34     { "nl", "Dutch",             "nplurals=2; plural=(n != 1);" },
     35     { "en", "English",           "nplurals=2; plural=(n != 1);" },
     36     { "fo", "Faroese",           "nplurals=2; plural=(n != 1);" },
     37     { "de", "German",            "nplurals=2; plural=(n != 1);" },
     38     { "nb", "Norwegian Bokmal",  "nplurals=2; plural=(n != 1);" },
     39     { "no", "Norwegian",         "nplurals=2; plural=(n != 1);" },
     40     { "nn", "Norwegian Nynorsk", "nplurals=2; plural=(n != 1);" },
     41     { "sv", "Swedish",           "nplurals=2; plural=(n != 1);" },
     42     { "et", "Estonian",          "nplurals=2; plural=(n != 1);" },
     43     { "fi", "Finnish",           "nplurals=2; plural=(n != 1);" },
     44     { "el", "Greek",             "nplurals=2; plural=(n != 1);" },
     45     { "he", "Hebrew",            "nplurals=2; plural=(n != 1);" },
     46     { "it", "Italian",           "nplurals=2; plural=(n != 1);" },
     47     { "pt", "Portuguese",        "nplurals=2; plural=(n != 1);" },
     48     { "es", "Spanish",           "nplurals=2; plural=(n != 1);" },
     49     { "eo", "Esperanto",         "nplurals=2; plural=(n != 1);" },
     50     { "hu", "Hungarian",         "nplurals=2; plural=(n != 1);" },
     51     { "fr", "French",            "nplurals=2; plural=(n > 1);" },
     52     { "pt_BR", "Brazilian",      "nplurals=2; plural=(n > 1);" },
     53     { "lv", "Latvian",           "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : 2);" },
     54     { "ga", "Irish",             "nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;" },
     55     { "ro", "Romanian",          "nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;" },
     56     { "lt", "Lithuanian",        "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);" },
     57     { "hr", "Croatian",          "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" },
     58     { "sr", "Serbian",           "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" },
     59     { "ru", "Russian",           "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" },
     60     { "uk", "Ukrainian",         "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" },
     61     { "sk", "Slovak",            "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" },
     62     { "cs", "Czech",             "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" },
     63     { "pl", "Polish",            "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" },
     64     { "sl", "Slovenian",         "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" }
     65   };
     66 const size_t plural_table_size = sizeof (plural_table) / sizeof (plural_table[0]);
     67