| 1 |
% Language definition file (part of polyglossia v2.10 -- 2026/04/18) |
| 2 |
% |
| 3 |
% Translations provided by ଅଶୋକ ଦାସ୍ <[email protected]> and ଅଭିଷେକ ଜେନା <[email protected]> |
| 4 |
% TODO implement Odia calendar |
| 5 |
|
| 6 |
\ProvidesFile{gloss-odia.ldf}[polyglossia: module for Odia] |
| 7 |
|
| 8 |
\RequirePackage{devanagaridigits} |
| 9 |
\RequirePackage{odiadigits} |
| 10 |
|
| 11 |
\PolyglossiaSetup{odia}{ |
| 12 |
bcp47=or, |
| 13 |
bcp47-language=or, |
| 14 |
bcp47-script=Orya, |
| 15 |
script=Odia, |
| 16 |
scripttag=odia, |
| 17 |
langtag=ODI, |
| 18 |
hyphennames={odia}, |
| 19 |
hyphenmins={2,2},%CHECK |
| 20 |
localnumeral=odianumerals, |
| 21 |
Localnumeral=odianumerals |
| 22 |
%TODO nouppercase=true, |
| 23 |
} |
| 24 |
|
| 25 |
% BCP-47 compliant aliases |
| 26 |
\setlanguagealias*{odia}{or} |
| 27 |
|
| 28 |
|
| 29 |
%Adapted from gloss-bengali.ldf |
| 30 |
|
| 31 |
\newif\ifodia@devanagari@numerals |
| 32 |
\newif\ifodia@odia@numerals |
| 33 |
\def\extras@odia{} |
| 34 |
\def\noextras@odia{} |
| 35 |
|
| 36 |
\DeclareKeys[polyglossia/gloss/odia] |
| 37 |
{ |
| 38 |
changecounternumbering.if = odia@changecounternumbering, |
| 39 |
changecounternumbering.default:n = true, |
| 40 |
numerals.choice:, |
| 41 |
numerals / devanagari.code = |
| 42 |
{% |
| 43 |
\odia@odia@numeralsfalse |
| 44 |
\odia@devanagari@numeralstrue |
| 45 |
\SetLanguageKeys{odia}{bcp47=or,bcp47-language=or,bcp47-extension-u=nu-deva}% |
| 46 |
}, |
| 47 |
numerals / odia.code = |
| 48 |
{% |
| 49 |
\odia@odia@numeralstrue |
| 50 |
\odia@devanagari@numeralsfalse |
| 51 |
}, |
| 52 |
numerals / western.code = |
| 53 |
{% |
| 54 |
\odia@odia@numeralsfalse |
| 55 |
\odia@devanagari@numeralsfalse |
| 56 |
\SetLanguageKeys{odia}{bcp47=or,bcp47-language=or,bcp47-extension-u=nu-latn}% |
| 57 |
}, |
| 58 |
numerals.default:n = devanagari, |
| 59 |
numerals/unknown.code = \xpg@warning{Unknown Odia numeral `#1'} |
| 60 |
} |
| 61 |
|
| 62 |
% Register default options |
| 63 |
\InitializeGlossOptions{odia}{changecounternumbering=false,numerals=devanagari} |
| 64 |
|
| 65 |
\def\captionsodia{% |
| 66 |
\def\refname{ସନ୍ଦର୍ଭ}% |
| 67 |
\def\abstractname{ସାରାଂଶ}% |
| 68 |
\def\bibname{ସୂଚନା}% |
| 69 |
\def\prefacename{ପ୍ରାରମ୍ଭ}% |
| 70 |
\def\chaptername{ଅଧ୍ୟାୟ}% |
| 71 |
\def\appendixname{ପରିଶିଷ୍ଟ}% |
| 72 |
\def\contentsname{ସୁଚୀ ପତ୍ର}% |
| 73 |
\def\listfigurename{ପ୍ରତିଛବି ତାଲିକା}% |
| 74 |
\def\listtablename{ଟେବୁଲ ତାଲିକା}% |
| 75 |
\def\indexname{ସୂଚକାଙ୍କ}% |
| 76 |
\def\figurename{ପ୍ରତିଛବି}% |
| 77 |
\def\tablename{ଟେବୁଲ୍}% |
| 78 |
\def\partname{ବିଭାଗ}% |
| 79 |
\def\pagename{ପୃଷ୍ଠା}% |
| 80 |
\def\seename{ଦେଖନ୍ତୁ}% |
| 81 |
\def\alsoname{ଅଧିକ ଦେଖନ୍ତୁ}% |
| 82 |
\def\enclname{ସଂଲଗ୍ନ}% |
| 83 |
\def\ccname{କପି କରନ୍ତୁ}% |
| 84 |
\def\headtoname{ପ୍ରତି}% |
| 85 |
\def\proofname{ପ୍ରମାଣ}% |
| 86 |
\def\glossaryname{ଶବ୍ଦର ଶବ୍ଦକୋଷ}% |
| 87 |
} |
| 88 |
\def\dateodia{% |
| 89 |
\def\odiamonth{% |
| 90 |
\ifcase\month\or |
| 91 |
ଜାନୁଆରୀ\or |
| 92 |
ଫେବୃଆରୀ\or |
| 93 |
ମାର୍ଚ୍ଚ\or |
| 94 |
ଏପ୍ରିଲ୍\or |
| 95 |
ମେ\or |
| 96 |
ଜୁନ୍\or |
| 97 |
ଜୁଲାଇ\or |
| 98 |
ଅଗଷ୍ଟ\or |
| 99 |
ସେପ୍ଟେମ୍ବର\or |
| 100 |
ଅକ୍ଟୋବର\or |
| 101 |
ନଭେମ୍ବର\or |
| 102 |
ଡିସେମ୍ବର\fi}% |
| 103 |
\def\today{\odianumber\day\space\odiamonth\space\odianumber\year}% |
| 104 |
} |
| 105 |
|
| 106 |
\newcommand{\odianumerals}[2]{\odianumber{#2}} |
| 107 |
|
| 108 |
\def\odianumber#1{% |
| 109 |
\ifodia@devanagari@numerals |
| 110 |
\devanagaridigits{\number#1}% |
| 111 |
\else |
| 112 |
\ifodia@odia@numerals |
| 113 |
\odiadigits{\number#1}% |
| 114 |
\else % Assumed Western |
| 115 |
\number#1% |
| 116 |
\fi |
| 117 |
\fi% |
| 118 |
} |
| 119 |
|
| 120 |
\def\odia@globalnumbers{% |
| 121 |
\ifodia@changecounternumbering |
| 122 |
\let\@arabic\odianumber% |
| 123 |
\renewcommand\thefootnote{\localnumeral*{footnote}}% |
| 124 |
\fi |
| 125 |
} |
| 126 |
|
| 127 |
%Adapted from gloss-marathi.ldf |
| 128 |
|
| 129 |
\def\odia@akshar#1{\ifcase#1\or ଅ\or ଆ\or ଇ\or ଈ\or ଉ\or ଊ\or ଋ\or ଏ\or ଐ\or ଓ\or ଔ\else\@ctrerr\fi} |
| 130 |
|
| 131 |
\def\odia@alph#1{% |
| 132 |
\ifcase#1\or କ\or ଖ\or ଗ\or ଘ\or ଙ\or ଚ\or ଛ\or ଜ\or ଝ\or ଞ\or ଟ\or ଠ\or ଡ\or ଢ\or ଣ\or ତ\or ଥ\or ଦ% |
| 133 |
\or ଧ\or ନ\or ପ\or ଫ\or ବ\or ଭ\or ମ\or ଯ\or ର\or ଲ\or ଳ\or ଶ\or ସ\or ଷ\or ହ\or କ୍ଷ \else\@ctrerr% |
| 134 |
\fi% |
| 135 |
} |
| 136 |
|
| 137 |
\def\odia@numbers{% |
| 138 |
\let\@alph\odia@alph |
| 139 |
\let\@Alph\devanagari@letter |
| 140 |
\let\@roman\odia@akshar |
| 141 |
\let\@Roman\devanagari@letter |
| 142 |
} |
| 143 |
|
| 144 |
|
| 145 |
% Store original definition |
| 146 |
\let\xpg@save@arabic\@arabic |
| 147 |
|
| 148 |
\def\noodia@globalnumbers{% |
| 149 |
\let\@arabic\xpg@save@arabic% |
| 150 |
} |
| 151 |
|
| 152 |
|
| 153 |
|
| 154 |
\def\blockextras@odia{\extras@odia} |
| 155 |
\def\inlineextras@odia{\extras@odia} |
| 156 |
|
| 157 |
\endinput |