# =============================================================================
# MBROLA NG - English (en) - numbers.txt
# Copyright (c) 2026 Darko Milošević
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Rule-based number format (syntax: see languages/hr/numbers.txt).
#   base/radix: text;   explicit divisor base (years: "2010/100" reads
#                       2026 as 20 + 26)
# Words are separated by spaces, not hyphens ("twenty one").
# =============================================================================

@plural one: i = 1 and v = 0

# -----------------------------------------------------------------------------
%spellout-cardinal:
  -x: minus >>;
  0: zero; 1: one; 2: two; 3: three; 4: four; 5: five; 6: six; 7: seven;
  8: eight; 9: nine; 10: ten; 11: eleven; 12: twelve; 13: thirteen;
  14: fourteen; 15: fifteen; 16: sixteen; 17: seventeen; 18: eighteen;
  19: nineteen;
  20: twenty[ >>]; 30: thirty[ >>]; 40: forty[ >>]; 50: fifty[ >>];
  60: sixty[ >>]; 70: seventy[ >>]; 80: eighty[ >>]; 90: ninety[ >>];
  100: << hundred[ >>];
  1000: << thousand[ >>];
  1000000: << million[ >>];
  1000000000: << billion[ >>];
  1000000000000: << trillion[ >>];

# -----------------------------------------------------------------------------
%spellout-ordinal:
  0: zeroth; 1: first; 2: second; 3: third; 4: fourth; 5: fifth; 6: sixth;
  7: seventh; 8: eighth; 9: ninth; 10: tenth; 11: eleventh; 12: twelfth;
  13: thirteenth; 14: fourteenth; 15: fifteenth; 16: sixteenth;
  17: seventeenth; 18: eighteenth; 19: nineteenth;
  20: twent>%%tieth>; 30: thirt>%%tieth>; 40: fort>%%tieth>;
  50: fift>%%tieth>; 60: sixt>%%tieth>; 70: sevent>%%tieth>;
  80: eight>%%tieth>; 90: ninet>%%tieth>;
  100: <%spellout-cardinal< hundred>%%th>;
  1000: <%spellout-cardinal< thousand>%%th>;
  1000000: <%spellout-cardinal< million>%%th>;
  1000000000: <%spellout-cardinal< billion>%%th>;
  1000000000000: <%spellout-cardinal< trillion>%%th>;

# "twent" + "ieth" / "twent" + "y first"
%%tieth:
  0: ieth;
  1: y =%spellout-ordinal=;

# "hundred" + "th" / "hundred" + " first"
%%th:
  0: th;
  1: ' =%spellout-ordinal=;

# -----------------------------------------------------------------------------
# Years: 1999 -> nineteen ninety nine, 1905 -> nineteen oh five,
# 1900 -> nineteen hundred, 2005 -> two thousand five, 2026 -> twenty twenty six
%spellout-numbering-year:
  -x: minus >>;
  0: =%spellout-cardinal=;
  1010/100: << >%%2d-year>;
  1100/100: << >%%2d-year>;
  2000: =%spellout-cardinal=;
  2010/100: << >%%2d-year>;
  2100/100: << >%%2d-year>;
  3000: =%spellout-cardinal=;

%%2d-year:
  0: hundred;
  1: oh =%spellout-cardinal=;
  10: =%spellout-cardinal=;
