| 1 |
% Language definition file (part of polyglossia v2.10 -- 2026/04/18) |
| 2 |
% |
| 3 |
\ProvidesFile{gloss-english.ldf}[polyglossia: module for English] |
| 4 |
|
| 5 |
\PolyglossiaSetup{english}{ |
| 6 |
bcp47=en-US, |
| 7 |
bcp47-language=en, |
| 8 |
bcp47-region=US, |
| 9 |
bcp47-script=Latn, |
| 10 |
hyphennames={english,american,usenglish,USenglish}, |
| 11 |
hyphenmins={2,3}, |
| 12 |
langtag=ENG, |
| 13 |
babelname=english |
| 14 |
} |
| 15 |
|
| 16 |
% BCP-47 compliant aliases |
| 17 |
\setlanguagealias*{english}{en} |
| 18 |
\setlanguagealias*[variant=australian]{english}{en-AU} |
| 19 |
\setlanguagealias*[variant=canadian]{english}{en-CA} |
| 20 |
\setlanguagealias*[variant=british]{english}{en-GB} |
| 21 |
\setlanguagealias*[variant=newzealand]{english}{en-NZ} |
| 22 |
\setlanguagealias*[variant=us]{english}{en-US} |
| 23 |
|
| 24 |
|
| 25 |
% Babel aliases |
| 26 |
\setlanguagealias[variant=us]{english}{american} |
| 27 |
\setlanguagealias[variant=australian]{english}{australian} |
| 28 |
\setlanguagealias[variant=british]{english}{british} |
| 29 |
\setlanguagealias[variant=canadian]{english}{canadian} |
| 30 |
\setlanguagealias[variant=newzealand]{english}{newzealand} |
| 31 |
|
| 32 |
\@ifundefined{ifbritish@hyphen}% |
| 33 |
{\newif\ifbritish@hyphen}{} |
| 34 |
\@ifundefined{ifenglish@ordinalmonthday}% |
| 35 |
{\newif\ifenglish@ordinalmonthday}{} |
| 36 |
\@ifundefined{ifbritish@dateformat}% |
| 37 |
{\newif\ifbritish@dateformat}{} |
| 38 |
|
| 39 |
% US English (\l@english) is default |
| 40 |
% Initialize its settings |
| 41 |
\def\english@variant{english} |
| 42 |
\british@hyphenfalse |
| 43 |
\english@ordinalmonthdayfalse |
| 44 |
\british@dateformatfalse |
| 45 |
|
| 46 |
\DeclareKeys[polyglossia/gloss/english] |
| 47 |
{ |
| 48 |
ordinalmonthday.if = english@ordinalmonthday, |
| 49 |
ordinalmonthday.default:n = true, |
| 50 |
variant.choices:nn = { uk, british, us, american, usmax, australian, newzealand, canadian } |
| 51 |
{% |
| 52 |
\ifcase\UseName{l_keys_choice_int}\or |
| 53 |
% uk: |
| 54 |
\british@hyphentrue |
| 55 |
\british@dateformattrue |
| 56 |
\english@ordinalmonthdaytrue |
| 57 |
\SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}% |
| 58 |
\or |
| 59 |
% british: |
| 60 |
\british@hyphentrue |
| 61 |
\british@dateformattrue |
| 62 |
\english@ordinalmonthdaytrue |
| 63 |
\SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}% |
| 64 |
\or |
| 65 |
% us: |
| 66 |
\british@hyphenfalse |
| 67 |
\british@dateformatfalse |
| 68 |
\english@ordinalmonthdayfalse |
| 69 |
\SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}% |
| 70 |
\or |
| 71 |
% american: |
| 72 |
\british@hyphenfalse |
| 73 |
\british@dateformatfalse |
| 74 |
\english@ordinalmonthdayfalse |
| 75 |
\SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}% |
| 76 |
\or |
| 77 |
% usmax: |
| 78 |
\british@hyphenfalse |
| 79 |
\british@dateformatfalse |
| 80 |
\english@ordinalmonthdayfalse |
| 81 |
\SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}% |
| 82 |
\IfLanguageDefinedF{usenglishmax}% |
| 83 |
{\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak |
| 84 |
I will use the standard patterns for US English instead}% |
| 85 |
\adddialect\l@usenglishmax\l@english |
| 86 |
}% |
| 87 |
\def\english@variant{usenglishmax}% |
| 88 |
\or |
| 89 |
% australian: |
| 90 |
% These use the british hyphenation patterns |
| 91 |
% but date formats without ordinals |
| 92 |
\british@hyphentrue |
| 93 |
\british@dateformattrue |
| 94 |
\english@ordinalmonthdayfalse |
| 95 |
\SetLanguageKeys{english}{babelname=australian,bcp47=en-AU,bcp47-language=en,bcp47-region=AU}% |
| 96 |
\AddDialectIfNeeded{australian}{english}% |
| 97 |
\or |
| 98 |
% newzealand: |
| 99 |
% These use the british hyphenation patterns |
| 100 |
% but date formats without ordinals |
| 101 |
\british@hyphentrue |
| 102 |
\british@dateformattrue |
| 103 |
\english@ordinalmonthdayfalse |
| 104 |
\SetLanguageKeys{english}{babelname=newzealand,bcp47=en-NZ,bcp47-language=en,bcp47-region=NZ}% |
| 105 |
\AddDialectIfNeeded{newzealand}{english}% |
| 106 |
\or |
| 107 |
% canadian: |
| 108 |
% This is currently equivalent to usenglish (as in babel) |
| 109 |
\british@hyphenfalse |
| 110 |
\british@dateformatfalse |
| 111 |
\english@ordinalmonthdayfalse |
| 112 |
\SetLanguageKeys{english}{babelname=canadian,bcp47=en-CA,bcp47-language=en,bcp47-region=CA}% |
| 113 |
\AddDialectIfNeeded{canadian}{english}% |
| 114 |
\fi |
| 115 |
\ifbritish@hyphen |
| 116 |
\IfLanguageDefinedF{ukenglish}% |
| 117 |
{\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak |
| 118 |
I will use the patterns for US English instead}% |
| 119 |
\adddialect\l@ukenglish\l@english |
| 120 |
}% |
| 121 |
\def\english@variant{ukenglish}% |
| 122 |
\fi |
| 123 |
}, |
| 124 |
variant.default:n = us, |
| 125 |
variant/unknown.code = \xpg@warning{Unknown English variant `#1'}, |
| 126 |
} |
| 127 |
|
| 128 |
% Register default options |
| 129 |
\InitializeGlossOptions{english}{variant=us,ordinalmonthday=false} |
| 130 |
% Register alias options |
| 131 |
\SetLanguageAliasValues{english}{variant}{us,american} |
| 132 |
\SetLanguageAliasValues{english}{variant}{uk,british} |
| 133 |
|
| 134 |
\ifxetex |
| 135 |
% Check if \l@english is defined. If not, try to set it to some variety |
| 136 |
% (specific order as in the csv list), or null language if everything fails |
| 137 |
\TryPatternWithFallback{english}{british, american, usenglishmax, australian, newzealand} |
| 138 |
\fi |
| 139 |
|
| 140 |
\def\english@language{% |
| 141 |
\SetupPolyglossiaLangPatterns{\english@variant}% |
| 142 |
}% |
| 143 |
|
| 144 |
\def\captionsenglish{% |
| 145 |
\def\prefacename{Preface}% |
| 146 |
\def\refname{References}% |
| 147 |
\def\abstractname{Abstract}% |
| 148 |
\def\bibname{Bibliography}% |
| 149 |
\def\chaptername{Chapter}% |
| 150 |
\def\appendixname{Appendix}% |
| 151 |
\def\contentsname{Contents}% |
| 152 |
\def\listfigurename{List of Figures}% |
| 153 |
\def\listtablename{List of Tables}% |
| 154 |
\def\indexname{Index}% |
| 155 |
\def\figurename{Figure}% |
| 156 |
\def\tablename{Table}% |
| 157 |
\def\partname{Part}% |
| 158 |
\def\enclname{encl}% |
| 159 |
\def\ccname{cc}% |
| 160 |
\def\headtoname{To}% |
| 161 |
\def\pagename{Page}% |
| 162 |
\def\seename{see}% |
| 163 |
\def\alsoname{see also}% |
| 164 |
\def\proofname{Proof}% |
| 165 |
} |
| 166 |
|
| 167 |
\def\dateenglish{% |
| 168 |
\def\english@day{% |
| 169 |
\ifenglish@ordinalmonthday |
| 170 |
\ifcase\day\or |
| 171 |
1st\or 2nd\or 3rd\or 4th\or 5th\or |
| 172 |
6th\or 7th\or 8th\or 9th\or 10th\or |
| 173 |
11th\or 12th\or 13th\or 14th\or 15th\or |
| 174 |
16th\or 17th\or 18th\or 19th\or 20th\or |
| 175 |
21st\or 22nd\or 23rd\or 24th\or 25th\or |
| 176 |
26th\or 27th\or 28th\or 29th\or 30th\or |
| 177 |
31st\fi |
| 178 |
\else\number\day\fi}% |
| 179 |
\def\english@month{\ifcase\month\or |
| 180 |
January\or February\or March\or April\or May\or June\or |
| 181 |
July\or August\or September\or October\or November\or December\fi}% |
| 182 |
\def\today{% |
| 183 |
\ifbritish@dateformat |
| 184 |
\english@day\space\english@month\space\number\year |
| 185 |
\else |
| 186 |
\english@month\space\english@day,\space\number\year |
| 187 |
\fi}% |
| 188 |
} |
| 189 |
|
| 190 |
\endinput |