% Language definition file (part of polyglossia v2.2 -- 2024/07/15) % \ProvidesFile{gloss-english.ldf}[polyglossia: module for English] \PolyglossiaSetup{english}{ bcp47=en-US, bcp47-language=en, bcp47-region=US, bcp47-script=Latn, hyphennames={english,american,usenglish,USenglish}, hyphenmins={2,3}, langtag=ENG, fontsetup=true, babelname=english } % BCP-47 compliant aliases \setlanguagealias*{english}{en} \setlanguagealias*[variant=australian]{english}{en-AU} \setlanguagealias*[variant=canadian]{english}{en-CA} \setlanguagealias*[variant=british]{english}{en-GB} \setlanguagealias*[variant=newzealand]{english}{en-NZ} \setlanguagealias*[variant=us]{english}{en-US} % Babel aliases \setlanguagealias[variant=us]{english}{american} \setlanguagealias[variant=australian]{english}{australian} \setlanguagealias[variant=british]{english}{british} \setlanguagealias[variant=canadian]{english}{canadian} \setlanguagealias[variant=newzealand]{english}{newzealand} \@ifundefined{ifbritish@hyphen}% {\newif\ifbritish@hyphen}{} \@ifundefined{ifenglish@ordinalmonthday}% {\newif\ifenglish@ordinalmonthday}{} \@ifundefined{ifbritish@dateformat}% {\newif\ifbritish@dateformat}{} % US English (\l@english) is default % Initialize its settings \def\english@variant{english} \british@hyphenfalse \english@ordinalmonthdayfalse \british@dateformatfalse \DeclareKeys[polyglossia/gloss/english] { ordinalmonthday.if = english@ordinalmonthday, ordinalmonthday.default:n = true, variant.choices:nn = { uk, british, us, american, usmax, australian, newzealand, canadian } {% \ifcase\UseName{l_keys_choice_int}\or % uk: \british@hyphentrue \british@dateformattrue \english@ordinalmonthdaytrue \SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}% \or % british: \british@hyphentrue \british@dateformattrue \english@ordinalmonthdaytrue \SetLanguageKeys{english}{babelname=british,bcp47=en-GB,bcp47-language=en,bcp47-region=GB}% \or % us: \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse \SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}% \or % american: \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse \SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}% \or % usmax: \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse \SetLanguageKeys{english}{babelname=american,bcp47=en-US,bcp47-language=en,bcp47-region=US}% \IfLanguageDefinedF{usenglishmax}% {\xpg@warning{No hyphenation patterns were loaded for "US English Max"\MessageBreak I will use the standard patterns for US English instead}% \adddialect\l@usenglishmax\l@english }% \def\english@variant{usenglishmax}% \or % australian: % These use the british hyphenation patterns % but date formats without ordinals \british@hyphentrue \british@dateformattrue \english@ordinalmonthdayfalse \SetLanguageKeys{english}{babelname=australian,bcp47=en-AU,bcp47-language=en,bcp47-region=AU}% \adddialect\l@australian\l@english \or % newzealand: % These use the british hyphenation patterns % but date formats without ordinals \british@hyphentrue \british@dateformattrue \english@ordinalmonthdayfalse \SetLanguageKeys{english}{babelname=newzealand,bcp47=en-NZ,bcp47-language=en,bcp47-region=NZ}% \adddialect\l@newzealand\l@english \or % canadian: % This is currently equivalent to usenglish (as in babel) \british@hyphenfalse \british@dateformatfalse \english@ordinalmonthdayfalse \SetLanguageKeys{english}{babelname=canadian,bcp47=en-CA,bcp47-language=en,bcp47-region=CA}% \adddialect\l@canadian\l@english \fi \ifbritish@hyphen \IfLanguageDefinedF{ukenglish}% {\xpg@warning{No hyphenation patterns were loaded for British English\MessageBreak I will use the patterns for US English instead}% \adddialect\l@ukenglish\l@english }% \def\english@variant{ukenglish}% \fi }, variant.default:n = us, variant/unknown.code = \xpg@warning{Unknown English variant `#1'}, } % Register default options \InitializeGlossOptions{english}{variant=us,ordinalmonthday=false} % Register alias options \SetLanguageAliasValues{english}{variant}{us,american} \SetLanguageAliasValues{english}{variant}{uk,british} \ifxetex % Check if \l@english is defined. If not, try to set it to some variety % (specific order as in the csv list), or null language if everything fails \TryPatternWithFallback{english}{british, american, usenglishmax, australian, newzealand} \fi \def\english@language{% \SetupPolyglossiaLangPatterns{\english@variant}% }% \def\captionsenglish{% \def\prefacename{Preface}% \def\refname{References}% \def\abstractname{Abstract}% \def\bibname{Bibliography}% \def\chaptername{Chapter}% \def\appendixname{Appendix}% \def\contentsname{Contents}% \def\listfigurename{List of Figures}% \def\listtablename{List of Tables}% \def\indexname{Index}% \def\figurename{Figure}% \def\tablename{Table}% \def\partname{Part}% \def\enclname{encl}% \def\ccname{cc}% \def\headtoname{To}% \def\pagename{Page}% \def\seename{see}% \def\alsoname{see also}% \def\proofname{Proof}% } \def\dateenglish{% \def\english@day{% \ifenglish@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\english@month{\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}% \def\today{% \ifbritish@dateformat \english@day\space\english@month\space\number\year \else \english@month\space\english@day,\space\number\year \fi}% } \endinput