1 /* Table of known plural form expressions.
2 Copyright (C) 2001-2005 Free Software Foundation, Inc.
3 Written by Bruno Haible <haible@clisp.cons.org>, 2002.
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)
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 #include "plural-table.h"
26 /* Formulas taken from the documentation, node "Plural forms". */
27 struct plural_table_entry plural_table
[] =
29 { "hu", "Hungarian", "nplurals=1; plural=0;" },
30 { "ja", "Japanese", "nplurals=1; plural=0;" },
31 { "ko", "Korean", "nplurals=1; plural=0;" },
32 { "vi", "Vietnamese", "nplurals=1; plural=0;" },
33 { "tr", "Turkish", "nplurals=1; plural=0;" },
34 { "da", "Danish", "nplurals=2; plural=(n != 1);" },
35 { "nl", "Dutch", "nplurals=2; plural=(n != 1);" },
36 { "en", "English", "nplurals=2; plural=(n != 1);" },
37 { "fo", "Faroese", "nplurals=2; plural=(n != 1);" },
38 { "de", "German", "nplurals=2; plural=(n != 1);" },
39 { "nb", "Norwegian Bokmal", "nplurals=2; plural=(n != 1);" },
40 { "no", "Norwegian", "nplurals=2; plural=(n != 1);" },
41 { "nn", "Norwegian Nynorsk", "nplurals=2; plural=(n != 1);" },
42 { "sv", "Swedish", "nplurals=2; plural=(n != 1);" },
43 { "et", "Estonian", "nplurals=2; plural=(n != 1);" },
44 { "fi", "Finnish", "nplurals=2; plural=(n != 1);" },
45 { "el", "Greek", "nplurals=2; plural=(n != 1);" },
46 { "he", "Hebrew", "nplurals=2; plural=(n != 1);" },
47 { "it", "Italian", "nplurals=2; plural=(n != 1);" },
48 { "pt", "Portuguese", "nplurals=2; plural=(n != 1);" },
49 { "es", "Spanish", "nplurals=2; plural=(n != 1);" },
50 { "eo", "Esperanto", "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 { "lt", "Lithuanian", "nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);" },
56 { "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);" },
57 { "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);" },
58 { "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);" },
59 { "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);" },
60 { "sk", "Slovak", "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" },
61 { "cs", "Czech", "nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;" },
62 { "pl", "Polish", "nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);" },
63 { "sl", "Slovenian", "nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);" }
65 const size_t plural_table_size
= sizeof (plural_table
) / sizeof (plural_table
[0]);