summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/polyglossia/gloss-lao.ldf
blob: cc587b62bb90149b30b02595b68fb3d07aa92228 (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
\ProvidesFile{gloss-lao.ldf}[polyglossia: module for Lao]
\makeatletter
\PolyglossiaSetup{lao}{
  script=Lao,
  scripttag=lao,
  hyphennames={lao},
  hyphenmins={1,1},
  fontsetup=true,
  %TODO localalph={xxx@alph,xxx@Alph}
  %TODO localdigits=laonumber
}

\newif\if@lao@numerals
\def\tmp@lao{lao}
\define@key{lao}{numerals}[arabic]{%
	\def\@tmpa{#1}%
	\ifx\@tmpa\tmp@lao\@lao@numeralstrue\else
	  \@lao@numeralsfalse\fi
}

\setkeys{lao}{numerals}

% Translations provided by Brian Wilson <bountonw at gmail.com>
\def\captionslao{%
  \def\prefacename{ຄໍານໍາ}%
  \def\refname{ໜັງສືອ້າງອີງ}%
  \def\abstractname{ບົດຫຍໍ້ຄວາມ}%
  \def\bibname{ເອກະສານອ້າງອີງ}%
  \def\chaptername{ບົດທີ}%
  \def\appendixname{ພາກຄັດຕິດ}%
  \def\contentsname{ສາລະບານ}%
  \def\listfigurename{ສາລະບານຮູບ}%
  \def\listtablename{ສາລະບານຕາຕະລາງ}%
  \def\indexname{ດັດຊະນີ}%
  \def\figurename{ຮູບທີ}%
  \def\tablename{ຕາຕະລາງທີ}%
  \def\partname{ພາກ}%
  \def\pagename{ໜ້າ}%
  \def\seename{ອ່ານ}%
  \def\alsoname{ອ່ານເພີ່ມ}%
  \def\enclname{ເອກະສານປະກອບ}%
  \def\ccname{ສໍາເນົາເຖິງ}%
  \def\headtoname{ຮຽນ}%
  \def\proofname{ຂໍ້ພິສູດ}%
  \def\glossaryname{ປະມວນສັບ}% 
}
\def\datelao{%   
   \def\lao@month{%
     \ifcase\month\or
      ມັງກອນ\or
      ກຸມພາ\or
      ມີນາ\or
      ເມສາ\or
      ພຶດສະພາ\or
      ມິຖຸນາ\or
      ກໍລະກົດ\or
      ສິງຫາ\or
      ກັນຍາ\or
      ຕຸລາ\or
      ພະຈິກ\or
      ທັນວາ\fi}%
   \def\today{\laonumber\day \space \lao@month \space \laonumber\year}%
}

\def\laodigits#1{\expandafter\@lao@digits #1@}
\def\@lao@digits#1{%
  \ifx @#1% then terminate
  \else
    \ifx0#1໐\else\ifx1#1໑\else\ifx2#1໒\else\ifx3#1໓\else\ifx4#1໔\else\ifx5#1໕\else\ifx6#1໖\else\ifx7#1໗\else\ifx8#1໘\else\ifx9#1໙\else#1\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
    \expandafter\@lao@digits
  \fi
}

\def\laonumber#1{%
  \if@lao@numerals
    \laodigits{\number#1}%
  \else
    \number#1%
  \fi}

\def\lao@globalnumbers{%
   \let\orig@arabic\@arabic%
   \let\@arabic\laonumber%
   \renewcommand{\thefootnote}{\protect\laonumber{\c@footnote}}%
}
\def\nolao@globalnumbers{%
   \let\@arabic\orig@arabic%
   \renewcommand\thefootnote{\protect\number{\c@footnote}}%
}

\makeatother
\endinput