summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia/gloss-english.ldf
blob: 74b572a09f374fce2f80d6e6c8896023cd31a9a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
\ProvidesFile{gloss-english.ldf}[polyglossia: module for english]
\makeatletter
\def\english@font{\normalfontlatin}

\ifx\l@english\@undefined
   \ifx\l@USenglish\@undefined
      \ifx\l@american\@undefined
         \xpg@nopatterns{English}
         \adddialect\l@english0
      \else
         \let\l@english\l@american
      \fi
   \else
      \let\l@english\l@USenglish
   \fi
\fi
\ifx\l@american\@undefined
   \let\l@american\l@english
\fi
\ifx\l@british\@undefined
   \ifx\l@UKenglish\@undefined
      \adddialect\l@british\l@english
  \else
      \let\l@british\l@UKenglish
  \fi
\fi

\def\tmp@us{us}
\def\tmp@uk{uk}
\def\tmp@british{british}
\def\tmp@american{american}
\def\tmp@australian{australian}
\def\tmp@newzealand{newzealand}
\def\en@variant{english}
\def\english@language{\expandafter\protect\expandafter\language=\csname l@\en@variant\endcsname}

\newif\if@ordinalmonthday

\define@key{english}{variant}[american]{%
  \def\@tmpa{#1}
  \ifx\@tmpa\tmp@uk\def\en@variant{british}\@ordinalmonthdaytrue
     \xpg@info{Option: english variant=british}
  \else\ifx\@tmpa\tmp@british\def\en@variant{british}\@ordinalmonthdaytrue
     \xpg@info{Option: english variant=british}
  \else\ifx\@tmpa\tmp@us\def\en@variant{american}\@ordinalmonthdayfalse
     \xpg@info{Option: english variant=american}
  \else\ifx\@tmpa\tmp@australian\def\en@variant{british}\@ordinalmonthdayfalse
     \xpg@info{Option: english variant=australian}
  \else\ifx\@tmpa\tmp@newzealand\def\en@variant{british}\@ordinalmonthdayfalse
     \xpg@info{Option: english variant=newzealand}
  \fi\fi\fi\fi\fi}

\def\tmp@true{true}
\define@key{english}{ordinalmonthday}[false]{%
  \def\@tmpa{#1}
  \ifx\@tmpa\tmp@true\@ordinalmonthdaytrue
  \else\@ordinalmonthdayfalse
  \fi}

\def\captionsenglish{%
   \def\prefacename{\textenglish{Preface}}%
   \def\refname{\textenglish{References}}%
   \def\abstractname{\textenglish{Abstract}}%
   \def\bibname{\textenglish{Bibliography}}%
   \def\chaptername{\textenglish{Chapter}}%
   \def\appendixname{\textenglish{Appendix}}%
   \def\contentsname{\textenglish{Contents}}%
   \def\listfigurename{\textenglish{List of Figures}}%
   \def\listtablename{\textenglish{List of Tables}}%
   \def\indexname{\textenglish{Index}}%
   \def\figurename{\textenglish{Figure}}%
   \def\tablename{\textenglish{Table}}%
   \def\partname{\textenglish{Part}}%
   \def\enclname{\textenglish{encl}}%
   \def\ccname{\textenglish{cc}}%
   \def\headtoname{\textenglish{To}}%
   \def\pagename{\textenglish{Page}}%
   \def\seename{\textenglish{see}}%
   \def\alsoname{\textenglish{see also}}%
   \def\proofname{\textenglish{Proof}}%
  } 
\def\dateenglish{%
   \def\english@day{%
     \if@ordinalmonthday%
       \ifcase\day\or
        1st\or 2nd\or 3rd\or 4th\or 5th\or
        6th\or 7th\or 8th\or 9th\or 10th\or
        11th\or 12th\or 13th\or 14th\or 15th\or
        16th\or 17th\or 18th\or 19th\or 20th\or
        21st\or 22nd\or 23rd\or 24th\or 25th\or
        26th\or 27th\or 28th\or 29th\or 30th\or
        31st\fi
     \else\number\day\fi}%
   \def\today{%
    \ifx\en@variant\tmp@british%
      \english@day\space%
     \ifcase\month\or%
      January\or February\or March\or April\or May\or June\or%
      July\or August\or September\or October\or November\or December\fi%
      \space\number\year%
     \else% 
     \ifcase\month\or%
      January\or February\or March\or April\or May\or June\or%
      July\or August\or September\or October\or November\or December\fi%
      \space\english@day, \number\year%
      \fi}
  }

%\setlocalhyphenmins{english}{2}{3}% this is the default in babel

\endinput