| 1 |
% Language definition file (part of polyglossia v2.10 -- 2026/04/18) |
| 2 |
% Draft changes by SpecialCharacter. |
| 3 |
% |
| 4 |
\ProvidesFile{gloss-kyrgyz.ldf}[polyglossia: module for Kyrgyz] |
| 5 |
|
| 6 |
\RequirePackage{xpg-cyrillicnumbers} |
| 7 |
|
| 8 |
\PolyglossiaSetup{kyrgyz}{ |
| 9 |
bcp47=kg, |
| 10 |
bcp47-language=kg, |
| 11 |
bcp47-script=Cyrl, |
| 12 |
script=Cyrillic, |
| 13 |
scripttag=cyrl, |
| 14 |
langtag=KY, |
| 15 |
hyphennames={nohyphenation}, |
| 16 |
% (Exchange with hyphennames={kyrgyz} when available.) |
| 17 |
hyphenmins={2,2}, |
| 18 |
% babel has {1,1} |
| 19 |
frenchspacing=true, |
| 20 |
indentfirst=true, |
| 21 |
localnumeral=kyrgyznumerals, |
| 22 |
Localnumeral=kyrgyznumerals |
| 23 |
} |
| 24 |
|
| 25 |
% BCP-47 compliant aliases |
| 26 |
\setlanguagealias*{kyrgyz}{kg} |
| 27 |
|
| 28 |
\newif\ifcyrillic@numerals |
| 29 |
\newif\ifcyrillic@asbuk@numerals |
| 30 |
\newif\ifkyrgyz@shortdate |
| 31 |
\newif\ifkyrgyz@kymonths |
| 32 |
|
| 33 |
\DeclareKeys[polyglossia/gloss/kyrgyz] |
| 34 |
{ |
| 35 |
babelshorthands.if = kyrgyz@babelshorthands, |
| 36 |
babelshorthands.default:n = true, |
| 37 |
forceheadingpunctuation.if = kyrgyz@forceheadingpunctuation, |
| 38 |
forceheadingpunctuation.default:n = true, |
| 39 |
numerals.choice:, |
| 40 |
numerals / arabic.code = |
| 41 |
{% |
| 42 |
\cyrillic@numeralsfalse |
| 43 |
\cyrillic@asbuk@numeralsfalse |
| 44 |
\SetLanguageKeys{kyrgyz}{bcp47-extension-u=nu-latn}% |
| 45 |
}, |
| 46 |
numerals / cyrillic.code = |
| 47 |
{% |
| 48 |
\cyrillic@numeralstrue |
| 49 |
\cyrillic@asbuk@numeralsfalse |
| 50 |
\SetLanguageKeys{kyrgyz}{bcp47-extension-u=nu-cyrl}% |
| 51 |
}, |
| 52 |
numerals / cyrillic-trad.code = |
| 53 |
{% |
| 54 |
\cyrillic@numeralstrue |
| 55 |
\cyrillic@asbuk@numeralsfalse |
| 56 |
\SetLanguageKeys{kyrgyz}{bcp47-extension-u=nu-cyrl}% |
| 57 |
}, |
| 58 |
numerals / cyrillic-alph.code = |
| 59 |
{% |
| 60 |
\cyrillic@numeralstrue |
| 61 |
\cyrillic@asbuk@numeralstrue |
| 62 |
\SetLanguageKeys{kyrgyz}{bcp47-extension-u=nu-cyrl}% |
| 63 |
}, |
| 64 |
numerals.default:n = arabic, |
| 65 |
numerals/unknown.code = \xpg@warning{Unknown kyrgyz numerals value `#1'}, |
| 66 |
indentfirst.choice:, |
| 67 |
indentfirst / true.code = |
| 68 |
{% |
| 69 |
\SetLanguageKeys{kyrgyz}{indentfirst=true}% |
| 70 |
}, |
| 71 |
indentfirst / false.code = |
| 72 |
{% |
| 73 |
\SetLanguageKeys{kyrgyz}{indentfirst=false}% |
| 74 |
}, |
| 75 |
indentfirst.default:n = true, |
| 76 |
date.choice:, |
| 77 |
date / short.code = |
| 78 |
{% |
| 79 |
\kyrgyz@shortdatetrue |
| 80 |
\kyrgyz@kymonthsfalse |
| 81 |
}, |
| 82 |
date / long-kymonths.code = |
| 83 |
{% |
| 84 |
\kyrgyz@shortdatefalse |
| 85 |
\kyrgyz@kymonthstrue |
| 86 |
}, |
| 87 |
date / long.code = |
| 88 |
{% |
| 89 |
\kyrgyz@shortdatefalse |
| 90 |
\kyrgyz@kymonthsfalse |
| 91 |
}, |
| 92 |
date / unknown.code = \xpg@warning{Unknown kyrgyz date value `#1'}, |
| 93 |
date.default:n = long, |
| 94 |
} |
| 95 |
|
| 96 |
\def\datekyrgyz{% |
| 97 |
\ifkyrgyz@shortdate |
| 98 |
\datekyrgyz@short% |
| 99 |
\else |
| 100 |
\ifkyrgyz@kymonths |
| 101 |
\datekyrgyz@long@kyrgyzmonths% |
| 102 |
\else |
| 103 |
\datekyrgyz@long@standard% |
| 104 |
\fi |
| 105 |
\fi |
| 106 |
} |
| 107 |
|
| 108 |
\ifsystem@babelshorthands |
| 109 |
\SetGlossOptions{kyrgyz}{babelshorthands=true} |
| 110 |
% Register default options |
| 111 |
\InitializeGlossOptions{kyrgyz}{babelshorthands=true, |
| 112 |
date=long, |
| 113 |
numerals=arabic, |
| 114 |
indentfirst=true, |
| 115 |
forceheadingpunctuation=true} |
| 116 |
\else |
| 117 |
\SetGlossOptions{kyrgyz}{babelshorthands=false} |
| 118 |
% Register default options |
| 119 |
\InitializeGlossOptions{kyrgyz}{babelshorthands=false, |
| 120 |
date=long, |
| 121 |
numerals=arabic, |
| 122 |
indentfirst=true, |
| 123 |
forceheadingpunctuation=true} |
| 124 |
\fi |
| 125 |
|
| 126 |
\InitializeBabelShorthands |
| 127 |
|
| 128 |
\def\kyrgyz@shorthands{% |
| 129 |
\xpg@activate@shorthands% |
| 130 |
\def\language@group{kyrgyz}% |
| 131 |
% \declare@shorthand{kyrgyz}{"`}{„}% |
| 132 |
% \declare@shorthand{kyrgyz}{"'}{“}% |
| 133 |
% \declare@shorthand{kyrgyz}{"<}{«}% |
| 134 |
% \declare@shorthand{kyrgyz}{">}{»}% |
| 135 |
\declare@shorthand{kyrgyz}{""}{\xpg@invisible@break}% |
| 136 |
\declare@shorthand{kyrgyz}{"~}{\xpg@nobreak@hyphen}% |
| 137 |
\declare@shorthand{kyrgyz}{"=}{\xpg@breakable@hyphen}% |
| 138 |
\declare@shorthand{kyrgyz}{"|}{\xpg@ligature@break}% |
| 139 |
\declare@shorthand{kyrgyz}{"-}{\xpg@cyrillic@dash}% |
| 140 |
\declare@shorthand{kyrgyz}{",}{\xpg@thinspace@allow@hyphenation@after}% |
| 141 |
} |
| 142 |
|
| 143 |
\ifx\cyrdash\undefined |
| 144 |
\def\cyrdash{\leavevmode\hbox to.8em{\textendash\hss\textendash}}% |
| 145 |
\fi |
| 146 |
|
| 147 |
\def\nokyrgyz@shorthands{% |
| 148 |
\xpg@deactivate@shorthands% |
| 149 |
} |
| 150 |
|
| 151 |
\def\captionskyrgyz{% |
| 152 |
\def\prefacename{Кириш~сөз}% |
| 153 |
\def\refname{Шилтеме}% |
| 154 |
\def\abstractname{Аннотация}% |
| 155 |
\def\bibname{Библиография}% |
| 156 |
\def\chaptername{Бөлүм}% |
| 157 |
\def\appendixname{Тиркеме}% |
| 158 |
\@ifundefined{thechapter}% |
| 159 |
{\def\contentsname{Мазмуну}}% |
| 160 |
{\def\contentsname{Мазмуну}}% |
| 161 |
% confirmation needed (Kyrgyz appears to have no distinction.) |
| 162 |
\def\listfigurename{Сүрөттөрдүн~тизмеси}% |
| 163 |
\def\listtablename{Таблицалардын~тизмеси}% |
| 164 |
\def\indexname{Индекс}% |
| 165 |
\def\authorname{[Именной~указатель]}% |
| 166 |
\def\figurename{Сүрөт}% |
| 167 |
% Abbreviation? |
| 168 |
\def\tablename{Таблица}% |
| 169 |
\def\partname{Бөлүк}% |
| 170 |
\def\enclname{Тиркеме}% |
| 171 |
% Abbreviation? |
| 172 |
\def\ccname{Көчүрмө~көчүрмөсү}% |
| 173 |
% Abbreviation? |
| 174 |
\def\headtoname{Кимге}% |
| 175 |
% Abbreviation? |
| 176 |
\def\pagename{Баракча}% |
| 177 |
% Abbreviation? |
| 178 |
\def\seename{караңыз}% |
| 179 |
% Abbreviation? |
| 180 |
\def\alsoname{ошондой~эле~караңыз}% |
| 181 |
% Abbreviation? |
| 182 |
\def\proofname{Далил}% |
| 183 |
% glossary = Глоссарий |
| 184 |
} |
| 185 |
|
| 186 |
\def\datekyrgyz@long@standard{% |
| 187 |
\def\today{\number\year-жылдын% |
| 188 |
\space\number\day-% |
| 189 |
\ifcase\month\or% |
| 190 |
январь\or |
| 191 |
февраль\or |
| 192 |
март\or |
| 193 |
апрель\or |
| 194 |
май\or |
| 195 |
июнь\or |
| 196 |
июль\or |
| 197 |
август\or |
| 198 |
сентябрь\or |
| 199 |
октябрь\or |
| 200 |
ноябрь\or |
| 201 |
декабрь\fi}% |
| 202 |
} |
| 203 |
|
| 204 |
|
| 205 |
\def\datekyrgyz@long@kyrgyzmonths{% |
| 206 |
\def\kyrgyz@day{% |
| 207 |
\ifcase\day\or |
| 208 |
1и\or 2си\or 3ү\or 4ү\or 5и\or |
| 209 |
6сы\or 7си\or 8и\or 9у\or 10у\or |
| 210 |
11и\or 12си\or 13ү\or 14ү\or 15и\or |
| 211 |
16сы\or 17си\or 18и\or 19у\or 20сы\or |
| 212 |
21и\or 22си\or 23ү\or 24ү\or 25и\or |
| 213 |
26сы\or 27си\or 28и\or 29у\or 30у\or |
| 214 |
31и\fi}% |
| 215 |
\def\today{\number\year-жылдын% |
| 216 |
\space\ifcase\month\or% |
| 217 |
үчтүн айынын\or |
| 218 |
бирдин айынын\or |
| 219 |
жалган курандын\or |
| 220 |
чын курандын\or |
| 221 |
бугунун\or |
| 222 |
кулжанын\or |
| 223 |
текенин\or |
| 224 |
баш оонанын\or |
| 225 |
аяк оонанын\or |
| 226 |
тогуздун айынын\or |
| 227 |
жетинин айынын\or |
| 228 |
бештин айынын\fi% |
| 229 |
\space\kyrgyz@day}% |
| 230 |
} |
| 231 |
|
| 232 |
|
| 233 |
\def\datekyrgyz@short{% |
| 234 |
\def\today{% |
| 235 |
\number\day.% |
| 236 |
\ifnum\month<10 0\fi\number\month.% |
| 237 |
\number\year}% |
| 238 |
} |
| 239 |
|
| 240 |
|
| 241 |
% Kyrgyz needs trailing dots in all headings |
| 242 |
\def\xpg@save@autodot{} |
| 243 |
\ifdef{\KOMAClassName}{% |
| 244 |
\providecommand*\autodot{}% |
| 245 |
\let\xpg@save@autodot\autodot% |
| 246 |
}{} |
| 247 |
|
| 248 |
\def\kyrgyz@capsformat{% |
| 249 |
\ifkyrgyz@forceheadingpunctuation% |
| 250 |
\ifdef{\KOMAClassName}{% |
| 251 |
\renewcommand*\autodot{.}% |
| 252 |
}{% |
| 253 |
% The following is based on some ideas from ruscor.sty |
| 254 |
\def\@seccntformat##1{\csname pre##1\endcsname% |
| 255 |
\csname the##1\endcsname% |
| 256 |
\csname post##1\endcsname}% |
| 257 |
\def\@aftersepkern{\hspace{0.5em}}% |
| 258 |
\def\postchapter{.\@aftersepkern}% |
| 259 |
\def\postsection{.\@aftersepkern}% |
| 260 |
\def\postsubsection{.\@aftersepkern}% |
| 261 |
\def\postsubsubsection{.\@aftersepkern}% |
| 262 |
\def\postparagraph{.\@aftersepkern}% |
| 263 |
\def\postsubparagraph{.\@aftersepkern}% |
| 264 |
\def\prechapter{}% |
| 265 |
\def\presection{}% |
| 266 |
\def\presubsection{}% |
| 267 |
\def\presubsubsection{}% |
| 268 |
\def\preparagraph{}% |
| 269 |
\def\presubparagraph{}% |
| 270 |
}% |
| 271 |
\fi% |
| 272 |
} |
| 273 |
|
| 274 |
\def\nokyrgyz@capsformat{% |
| 275 |
\ifkyrgyz@forceheadingpunctuation% |
| 276 |
\ifdef{\KOMAClassName}{% |
| 277 |
\let\autodot\xpg@save@autodot% |
| 278 |
}{% |
| 279 |
\def\@seccntformat##1{\csname the##1\endcsname\quad}% = LaTeX kernel |
| 280 |
}% |
| 281 |
\fi% |
| 282 |
} |
| 283 |
|
| 284 |
\newcommand{\kyrgyznumerals}[2]{\kyrgyznumber{#2}} |
| 285 |
\newcommand{\Kyrgyznumerals}[2]{\Kyrgyznumber{#2}} |
| 286 |
|
| 287 |
\def\kyrgyznumber#1{% |
| 288 |
\ifcyrillic@numerals |
| 289 |
\ifcyrillic@asbuk@numerals |
| 290 |
\kyrgyz@asbuk@alph{#1}% |
| 291 |
\else |
| 292 |
\cyr@alph{#1}% |
| 293 |
\fi |
| 294 |
\else |
| 295 |
\number#1% |
| 296 |
\fi% |
| 297 |
} |
| 298 |
|
| 299 |
\def\Kyrgyznumber#1{% |
| 300 |
\ifcyrillic@numerals |
| 301 |
\ifcyrillic@asbuk@numerals |
| 302 |
\kyrgyz@asbuk@Alph{#1}% |
| 303 |
\else |
| 304 |
\cyr@Alph{#1}% |
| 305 |
\fi |
| 306 |
\else |
| 307 |
\number#1% |
| 308 |
\fi% |
| 309 |
} |
| 310 |
|
| 311 |
\let\kyrgyznumeral=\kyrgyznumber |
| 312 |
\let\Kyrgyznumeral=\Kyrgyznumber |
| 313 |
|
| 314 |
\def\Asbuk#1{\expandafter\kyrgyz@asbuk@Alph\csname c@#1\endcsname} |
| 315 |
\def\asbuk#1{\expandafter\kyrgyz@asbuk@alph\csname c@#1\endcsname} |
| 316 |
|
| 317 |
\def\AsbukTrad#1{\expandafter\cyr@Alph\csname c@#1\endcsname} |
| 318 |
\def\asbukTrad#1{\expandafter\cyr@alph\csname c@#1\endcsname} |
| 319 |
|
| 320 |
|
| 321 |
% This is a poor man's cyrillic alphanumeric. It just uses the alphabet and |
| 322 |
% thus ends at xxx. |
| 323 |
\def\kyrgyz@asbuk@Alph#1{\ifcase#1\or |
| 324 |
А\or Б\or В\or Г\or Д\or Е\or Ё\or Ж\or |
| 325 |
З\or И\or Й\or К\or Л\or М\or Н\or Ң\or О\or Ө\or |
| 326 |
П\or Р\or С\or Т\or У\or Ү\or Ф\or Х\or |
| 327 |
Ц\or Ч\or Ш\or Щ\or Ъ\or Ы\or Ь\or Э\or Ю\or Я% |
| 328 |
\else\xpg@ill@value{#1}{kyrgyz@asbuk@Alph}\fi% |
| 329 |
} |
| 330 |
|
| 331 |
\def\kyrgyz@asbuk@alph#1{\ifcase#1\or |
| 332 |
а\or б\or в\or г\or д\or е\or ё\or ж\or |
| 333 |
з\or и\or й\or к\or л\or м\or н\or ң\or о\or ө\or |
| 334 |
п\or р\or с\or т\or у\or ү\or ф\or х\or |
| 335 |
ц\or ч\or ш\or щ\or ъ\or ы\or ь\or э\or ю\or я% |
| 336 |
\else\xpg@ill@value{#1}{kyrgyz@asbuk@alph}\fi% |
| 337 |
} |
| 338 |
|
| 339 |
\def\kyrgyz@numbers{% |
| 340 |
\let\latin@alph\@alph |
| 341 |
\let\latin@Alph\@Alph |
| 342 |
\ifcyrillic@numerals% |
| 343 |
\def\kyrgyz@alph##1{\expandafter\kyrgyznumeral\expandafter{\the##1}}% |
| 344 |
\def\kyrgyz@Alph##1{\expandafter\kyrgyznumeral\expandafter{\the##1}}% |
| 345 |
\let\@alph\kyrgyz@alph% |
| 346 |
\let\@Alph\kyrgyz@Alph% |
| 347 |
\fi |
| 348 |
} |
| 349 |
|
| 350 |
\def\nokyrgyz@numbers{% |
| 351 |
\let\@alph\latin@alph% |
| 352 |
\let\@Alph\latin@Alph% |
| 353 |
} |
| 354 |
|
| 355 |
\def\noextras@kyrgyz{% |
| 356 |
\nokyrgyz@capsformat% |
| 357 |
\ifcyrillic@numerals\nokyrgyz@numbers\fi% |
| 358 |
\ifkyrgyz@babelshorthands\nokyrgyz@shorthands\fi% |
| 359 |
} |
| 360 |
|
| 361 |
\def\blockextras@kyrgyz{% |
| 362 |
\kyrgyz@capsformat% |
| 363 |
\ifcyrillic@numerals\kyrgyz@numbers\else\nokyrgyz@numbers\fi% |
| 364 |
\ifkyrgyz@babelshorthands\kyrgyz@shorthands\else\nokyrgyz@shorthands\fi% |
| 365 |
} |
| 366 |
|
| 367 |
\def\inlineextras@kyrgyz{% |
| 368 |
\ifkyrgyz@babelshorthands\kyrgyz@shorthands\else\nokyrgyz@shorthands\fi% |
| 369 |
} |
| 370 |
|
| 371 |
\endinput |
| 372 |
|