-
Notifications
You must be signed in to change notification settings - Fork 5
/
rfclang.sty
87 lines (81 loc) · 2.53 KB
/
rfclang.sty
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Update 2021/05/29: TeX4ht now provides similar code by default,
% so this package is obsolete.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% this code is copied from tex4ebook.sty
\RequirePackage{etoolbox}
%Declare RFC3066 language code for babel language name
\def\DeclareLanguage#1#2{%
\csgdef{rfclang#1}{#2}%
}
\def\GetMainLanguage{%
\ifx\bbl@main@language\@undefined en-US%
\else%
\ifcsdef{rfclang\bbl@main@language}{\csuse{rfclang\bbl@main@language}}{}%
\fi%
}
\def\GetLanguage{%
\ifx\languagename\@undefined en-US%
\else%
\ifcsdef{rfclang\languagename}{\csuse{rfclang\languagename}}{}%
\fi%
}
\DeclareLanguage{english}{en-US}
\DeclareLanguage{czech}{cs-CZ}
\DeclareLanguage{french}{fr}
\DeclareLanguage{polish}{pl-PL}
\DeclareLanguage{german}{de}
\DeclareLanguage{bulgarian}{bg}
\DeclareLanguage{catalan}{ca}
\DeclareLanguage{croatian}{hr}
\DeclareLanguage{danish}{da}
\DeclareLanguage{dutch}{nl}
\DeclareLanguage{USenglish}{en-US}
\DeclareLanguage{american}{en-US}
\DeclareLanguage{UKenglish}{en-GB}
\DeclareLanguage{british}{en-GB}
\DeclareLanguage{canadian}{en-US}
\DeclareLanguage{australian}{en-US}
\DeclareLanguage{newzealand}{en-US}
\DeclareLanguage{esperanto}{eo}
\DeclareLanguage{estonian}{et}
\DeclareLanguage{finnish}{f\/i}
\DeclareLanguage{francais}{fr}
\DeclareLanguage{canadien}{fr}
\DeclareLanguage{acadian}{fr}
\DeclareLanguage{galician}{gl}
\DeclareLanguage{austrian}{de}
\DeclareLanguage{german}{de}
\DeclareLanguage{germanb}{de}
\DeclareLanguage{ngerman}{de}
\DeclareLanguage{naustrian}{de}
\DeclareLanguage{greek}{el}
\DeclareLanguage{polutonikogreek}{el}
\DeclareLanguage{hebrew}{he}
\DeclareLanguage{magyar}{hu}
\DeclareLanguage{hungarian}{hu}
\DeclareLanguage{icelandic}{is}
\DeclareLanguage{interlingua}{ie}
\DeclareLanguage{irish}{ga}
\DeclareLanguage{italian}{it}
\DeclareLanguage{latin}{la}
%\DeclareLanguage{lowersorbian}{no code?}
%\DeclareLanguage{samin}{no code?}
\DeclareLanguage{norsk}{no}
\DeclareLanguage{nynorsk}{no}
\DeclareLanguage{portuges}{pt}
\DeclareLanguage{portuguese}{pt}
\DeclareLanguage{brazilian}{pt}
\DeclareLanguage{brazil}{pt}
\DeclareLanguage{romanian}{ro}
\DeclareLanguage{russian}{ru}
%\DeclareLanguage{scottish}{no code?}
\DeclareLanguage{spanish}{es}
\DeclareLanguage{slovak}{sk}
\DeclareLanguage{slovene}{sl}
\DeclareLanguage{swedish}{sv}
\DeclareLanguage{serbian}{sr}
\DeclareLanguage{turkish}{tr}
\DeclareLanguage{ukrainian}{uk}
%\DeclareLanguage{uppersorbian}{no code?}
\DeclareLanguage{welsh}{cy}