summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/projlib/PJLlang.sty
blob: 55d9e18c8f345be6bc650c29689c2a2090845b32 (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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
%%
%% This is file `PJLlang.sty',
%% generated with the docstrip utility.

%% Copyright (C) 2021 by Jinwen XU
%% 
%% This is part of the ProjLib Toolkit.
%% 
%% This work may be distributed and/or modified under the conditions of the
%% LaTeX Project Public License, either version 1.3c of this license or (at
%% your option) any later version. The latest version of this license is in
%% 
%%     http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3c or later is part of all distributions of LaTeX version
%% 2005/12/01 or later.
%% 
\NeedsTeXFormat{LaTeX2e}[2020-10-01]
\ProvidesPackage{PJLlang}
    [2021/07/27 Multi-language configuration]
\RequirePackage{kvoptions}
\RequirePackage{etoolbox}
\SetupKeyvalOptions{%
    family = @PJLlang,
    prefix = @PJLlang@
}
\DeclareBoolOption[false]{polyglossia}

\newif\if@PJLlang@enable@all\@PJLlang@enable@alltrue
\newif\if@PJLlang@enable@EN\@PJLlang@enable@ENfalse
\newif\if@PJLlang@enable@FR\@PJLlang@enable@FRfalse
\newif\if@PJLlang@enable@DE\@PJLlang@enable@DEfalse
\newif\if@PJLlang@enable@IT\@PJLlang@enable@ITfalse
\newif\if@PJLlang@enable@PT\@PJLlang@enable@PTfalse
\newif\if@PJLlang@enable@BR\@PJLlang@enable@BRfalse
\newif\if@PJLlang@enable@ES\@PJLlang@enable@ESfalse
\newif\if@PJLlang@enable@CN\@PJLlang@enable@CNfalse
\newif\if@PJLlang@enable@TC\@PJLlang@enable@TCfalse
\newif\if@PJLlang@enable@JP\@PJLlang@enable@JPfalse
\newif\if@PJLlang@enable@RU\@PJLlang@enable@RUfalse
\def\PJLlang@babeloptions{}
\DeclareVoidOption{EN}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}\gpreto{\PJLlang@babeloptions}{,english}}
\DeclareVoidOption{english}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}\gpreto{\PJLlang@babeloptions}{,english}}
\DeclareVoidOption{English}{\@PJLlang@enable@allfalse\@PJLlang@enable@ENtrue\providecommand{\PJLlang@mainlang}{EN}\gpreto{\PJLlang@babeloptions}{,english}}
\DeclareVoidOption{FR}{\@PJLlang@enable@allfalse\@PJLlang@enable@FRtrue\providecommand{\PJLlang@mainlang}{FR}\gpreto{\PJLlang@babeloptions}{,french}}
\DeclareVoidOption{french}{\@PJLlang@enable@allfalse\@PJLlang@enable@FRtrue\providecommand{\PJLlang@mainlang}{FR}\gpreto{\PJLlang@babeloptions}{,french}}
\DeclareVoidOption{French}{\@PJLlang@enable@allfalse\@PJLlang@enable@FRtrue\providecommand{\PJLlang@mainlang}{FR}\gpreto{\PJLlang@babeloptions}{,french}}
\DeclareVoidOption{DE}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}\gpreto{\PJLlang@babeloptions}{,ngerman}}
\DeclareVoidOption{german}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}\gpreto{\PJLlang@babeloptions}{,ngerman}}
\DeclareVoidOption{ngerman}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}\gpreto{\PJLlang@babeloptions}{,ngerman}}
\DeclareVoidOption{German}{\@PJLlang@enable@allfalse\@PJLlang@enable@DEtrue\providecommand{\PJLlang@mainlang}{DE}\gpreto{\PJLlang@babeloptions}{,ngerman}}
\DeclareVoidOption{IT}{\@PJLlang@enable@allfalse\@PJLlang@enable@ITtrue\providecommand{\PJLlang@mainlang}{IT}\gpreto{\PJLlang@babeloptions}{,italian}}
\DeclareVoidOption{italian}{\@PJLlang@enable@allfalse\@PJLlang@enable@ITtrue\providecommand{\PJLlang@mainlang}{IT}\gpreto{\PJLlang@babeloptions}{,italian}}
\DeclareVoidOption{Italian}{\@PJLlang@enable@allfalse\@PJLlang@enable@ITtrue\providecommand{\PJLlang@mainlang}{IT}\gpreto{\PJLlang@babeloptions}{,italian}}
\DeclareVoidOption{PT}{\@PJLlang@enable@allfalse\@PJLlang@enable@PTtrue\providecommand{\PJLlang@mainlang}{PT}\gpreto{\PJLlang@babeloptions}{,portuguese}}
\DeclareVoidOption{portuguese}{\@PJLlang@enable@allfalse\@PJLlang@enable@PTtrue\providecommand{\PJLlang@mainlang}{PT}\gpreto{\PJLlang@babeloptions}{,portuguese}}
\DeclareVoidOption{Portuguese}{\@PJLlang@enable@allfalse\@PJLlang@enable@PTtrue\providecommand{\PJLlang@mainlang}{PT}\gpreto{\PJLlang@babeloptions}{,portuguese}}
\DeclareVoidOption{BR}{\@PJLlang@enable@allfalse\@PJLlang@enable@BRtrue\providecommand{\PJLlang@mainlang}{BR}\gpreto{\PJLlang@babeloptions}{,brazilian}}
\DeclareVoidOption{brazilian}{\@PJLlang@enable@allfalse\@PJLlang@enable@BRtrue\providecommand{\PJLlang@mainlang}{BR}\gpreto{\PJLlang@babeloptions}{,brazilian}}
\DeclareVoidOption{Brazilian}{\@PJLlang@enable@allfalse\@PJLlang@enable@BRtrue\providecommand{\PJLlang@mainlang}{BR}\gpreto{\PJLlang@babeloptions}{,brazilian}}
\DeclareVoidOption{ES}{\@PJLlang@enable@allfalse\@PJLlang@enable@EStrue\providecommand{\PJLlang@mainlang}{ES}\gpreto{\PJLlang@babeloptions}{,spanish}}
\DeclareVoidOption{spanish}{\@PJLlang@enable@allfalse\@PJLlang@enable@EStrue\providecommand{\PJLlang@mainlang}{ES}\gpreto{\PJLlang@babeloptions}{,spanish}}
\DeclareVoidOption{Spanish}{\@PJLlang@enable@allfalse\@PJLlang@enable@EStrue\providecommand{\PJLlang@mainlang}{ES}\gpreto{\PJLlang@babeloptions}{,spanish}}
\DeclareVoidOption{CN}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{chinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{Chinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{schinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{SChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{simplifiedchinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{SimplifiedChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@CNtrue\providecommand{\PJLlang@mainlang}{CN}}
\DeclareVoidOption{TC}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}}
\DeclareVoidOption{tchinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}}
\DeclareVoidOption{TChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}}
\DeclareVoidOption{traditionalchinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}}
\DeclareVoidOption{TraditionalChinese}{\@PJLlang@enable@allfalse\@PJLlang@enable@TCtrue\providecommand{\PJLlang@mainlang}{TC}}
\DeclareVoidOption{JP}{\@PJLlang@enable@allfalse\@PJLlang@enable@JPtrue\providecommand{\PJLlang@mainlang}{JP}\gpreto{\PJLlang@babeloptions}{,japanese}}
\DeclareVoidOption{japanese}{\@PJLlang@enable@allfalse\@PJLlang@enable@JPtrue\providecommand{\PJLlang@mainlang}{JP}\gpreto{\PJLlang@babeloptions}{,japanese}}
\DeclareVoidOption{Japanese}{\@PJLlang@enable@allfalse\@PJLlang@enable@JPtrue\providecommand{\PJLlang@mainlang}{JP}\gpreto{\PJLlang@babeloptions}{,japanese}}
\DeclareVoidOption{RU}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}\gpreto{\PJLlang@babeloptions}{,russian}}
\DeclareVoidOption{russian}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}\gpreto{\PJLlang@babeloptions}{,russian}}
\DeclareVoidOption{Russian}{\@PJLlang@enable@allfalse\@PJLlang@enable@RUtrue\providecommand{\PJLlang@mainlang}{RU}\gpreto{\PJLlang@babeloptions}{,russian}}
\ProcessKeyvalOptions*\relax

\ExplSyntaxOn
\cs_new_protected:cpn { @clearglobaloption } #1
 {
  \clist_remove_all:cn { @classoptionslist } { #1 }
 }
\ExplSyntaxOff

\@clearglobaloption{chinese}
\@clearglobaloption{Chinese}

\providecommand{\PJLlang@mainlang}{EN}

\if@PJLlang@enable@all
    \@PJLlang@enable@ENtrue
    \@PJLlang@enable@FRtrue
    \@PJLlang@enable@DEtrue
    \@PJLlang@enable@ITtrue
    \@PJLlang@enable@PTtrue
    \@PJLlang@enable@BRtrue
    \@PJLlang@enable@EStrue
    \@PJLlang@enable@CNtrue
    \@PJLlang@enable@TCtrue
    \@PJLlang@enable@JPtrue
    \@PJLlang@enable@RUtrue
\fi

\newcommand\englishABBR{EN}
\newcommand\frenchABBR{FR}
\newcommand\ngermanABBR{DE}
\newcommand\italianABBR{IT}
\newcommand\portugueseABBR{PT}
\newcommand\brazilianABBR{BR}
\newcommand\spanishABBR{ES}
\newcommand\chineseABBR{CN}
\newcommand\tchineseABBR{TC}
\newcommand\japaneseABBR{JP}
\newcommand\russianABBR{RU}

\RequirePackage{iftex}
\ifPDFTeX
\RequirePackage[T1]{fontenc}
\RequirePackage{inputenc}
\fi

\if@PJLlang@polyglossia
    \RequirePackage{polyglossia}
    \setdefaultlanguage{english}
    \setotherlanguage[frenchpart=false]{french}
    \setotherlanguage{ngerman}
    \setotherlanguage{spanish}
    \setotherlanguage{portuguese}
    \setotherlanguage[variant=brazilian]{portuguese}
    \setotherlanguage{italian}
    \ifPDFTeX\else
        \setotherlanguage{russian}
        \setotherlanguage{japanese}
        \RequirePackage{silence}
        \WarningFilter{polyglossia}{Asking to add empty feature to latin font(Script="CJK" to scripttag "")}
    \fi
\else
    \if@PJLlang@enable@all
        \ifPDFTeX\else
            \PassOptionsToPackage{japanese,russian}{babel}
        \fi
        \PassOptionsToPackage{italian,portuguese,brazilian,spanish,es-notilde,es-noquoting,ngerman,french,english,shorthands=off}{babel}
    \else
        \PassOptionsToPackage{\PJLlang@babeloptions}{babel}
    \fi
    \PassOptionsToPackage{italian,brazilian,spanish,ngerman,french,english}{cleveref}
    \RequirePackage{babel}
    \if@PJLlang@enable@FR
        \frenchsetup{PartNameFull=false}
    \fi
\fi

\let\today@PJLoriginal\today
\newcommand{\PJLlang@langconfig@common}{%
    \ifdefined\DTMtoday%
        \let\today\DTMtoday%
    \else%
        \let\today\today@PJLoriginal%
    \fi%
}

\newcommand{\PJLlang@langconfig@chinese}{%
    \def\abstractname{摘要}%
    \def\proofname{证明}%
    \def\contentsname{目录}%
    \def\listfigurename{插图}%
    \def\listtablename{表格}%
    \def\figurename{图}%
    \def\tablename{表}%
    \def\indexname{索引}%
    \def\appendixname{附录}%
    \def\refname{参考文献}%
    \def\bibname{参考文献}%
    \let\today\zhtoday%
    \renewcommand{\languagename}{chinese}%
}
\newcommand{\PJLlang@langconfig@tchinese}{%
    \def\abstractname{摘要}%
    \def\proofname{證明}%
    \def\contentsname{目錄}%
    \def\listfigurename{插圖}%
    \def\listtablename{表格}%
    \def\figurename{圖}%
    \def\tablename{表}%
    \def\indexname{索引}%
    \def\appendixname{附錄}%
    \def\refname{參考文獻}%
    \def\bibname{參考文獻}%
    \let\today\zhtoday%
    \renewcommand{\languagename}{tchinese}%
}
\newcommand{\PJLlang@langconfig@japanese}{%
    \selectlanguage{japanese}%
}
\newcommand{\PJLlang@langconfig@english}{%
    \selectlanguage{english}%
}
\newcommand{\PJLlang@langconfig@french}{%
    \selectlanguage{french}%
    \def\frenchpartname{Partie}%
}
\newcommand{\PJLlang@langconfig@german}{%
    \selectlanguage{ngerman}%
}
\newcommand{\PJLlang@langconfig@italian}{%
    \selectlanguage{italian}%
}
\newcommand{\PJLlang@langconfig@portuguese}{%
    \selectlanguage{portuguese}%
}
\newcommand{\PJLlang@langconfig@brazilian}{%
    \selectlanguage{brazilian}%
}
\newcommand{\PJLlang@langconfig@spanish}{%
    \selectlanguage{spanish}%
}
\newcommand{\PJLlang@langconfig@russian}{%
    \selectlanguage{russian}%
}

\RequirePackage{xstring}
\NewDocumentCommand\AddLanguageSetting{d()m}{%
\IfNoValueTF{#1}%
    {\gappto{\PJLlang@langconfig@common}{#2}}%
    {%
        \lowercase{\IfStrEqCase{#1}}{%
            {cn}{\gappto{\PJLlang@langconfig@chinese}{#2}}%
            {chinese}{\gappto{\PJLlang@langconfig@chinese}{#2}}%
            {schinese}{\gappto{\PJLlang@langconfig@chinese}{#2}}%
            {simplifiedchinese}{\gappto{\PJLlang@langconfig@chinese}{#2}}%
            {tc}{\gappto{\PJLlang@langconfig@tchinese}{#2}}%
            {tchinese}{\gappto{\PJLlang@langconfig@tchinese}{#2}}%
            {traditionalchinese}{\gappto{\PJLlang@langconfig@tchinese}{#2}}%
            {jp}{\gappto{\PJLlang@langconfig@japanese}{#2}}%
            {japanese}{\gappto{\PJLlang@langconfig@japanese}{#2}}%
            {en}{\gappto{\PJLlang@langconfig@english}{#2}}%
            {english}{\gappto{\PJLlang@langconfig@english}{#2}}%
            {fr}{\gappto{\PJLlang@langconfig@french}{#2}}%
            {french}{\gappto{\PJLlang@langconfig@french}{#2}}%
            {de}{\gappto{\PJLlang@langconfig@german}{#2}}%
            {ngerman}{\gappto{\PJLlang@langconfig@german}{#2}}%
            {it}{\gappto{\PJLlang@langconfig@italian}{#2}}%
            {italian}{\gappto{\PJLlang@langconfig@italian}{#2}}%
            {pt}{\gappto{\PJLlang@langconfig@portuguese}{#2}}%
            {portuguese}{\gappto{\PJLlang@langconfig@portuguese}{#2}}%
            {br}{\gappto{\PJLlang@langconfig@brazilian}{#2}}%
            {brazilian}{\gappto{\PJLlang@langconfig@brazilian}{#2}}%
            {es}{\gappto{\PJLlang@langconfig@spanish}{#2}}%
            {spanish}{\gappto{\PJLlang@langconfig@spanish}{#2}}%
            {german}{\gappto{\PJLlang@langconfig@german}{#2}}%
            {ru}{\gappto{\PJLlang@langconfig@russian}{#2}}%
            {russian}{\gappto{\PJLlang@langconfig@russian}{#2}}%
        }%
    }%
}

\RequirePackage{setspace}
\def\PJL@config@linespacing{\setstretch{1.00}}
\def\PJL@config@CJKlinespacing{\onehalfspacing}
\newcommand{\PJLsetlinespacing}[1]{\renewcommand{\PJL@config@linespacing}{#1}}
\newcommand{\PJLsetCJKlinespacing}[1]{\renewcommand{\PJL@config@CJKlinespacing}{#1}}
\def\PJL@config@parindent{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{1.5em}}}
\def\PJL@config@CJKparindent{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{2em}}}
\newcommand{\PJLsetparindent}[1]{\renewcommand{\PJL@config@parindent}{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{#1}}}}
\newcommand{\PJLsetCJKparindent}[1]{\renewcommand{\PJL@config@CJKparindent}{\ltx@ifpackageloaded{parskip}{}{\setlength{\parindent}{#1}}}}
\def\PJL@config@CJK{\PJL@config@CJKlinespacing\PJL@config@CJKparindent}
\def\PJL@config@Latin{\PJL@config@linespacing\PJL@config@parindent}
\newcommand{\UseLanguageCORE}[1]{%
    \PJLlang@langconfig@common%
    \lowercase{\IfStrEqCase{#1}}{%
        {cn}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
        {chinese}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
        {schinese}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
        {simplifiedchinese}{\PJL@config@CJK\PJLlang@langconfig@chinese}%
        {tc}{\PJL@config@CJK\PJLlang@langconfig@tchinese}%
        {tchinese}{\PJL@config@CJK\PJLlang@langconfig@tchinese}%
        {traditionalchinese}{\PJL@config@CJK\PJLlang@langconfig@tchinese}%
        {jp}{\PJL@config@CJK\PJLlang@langconfig@japanese}%
        {japanese}{\PJL@config@CJK\PJLlang@langconfig@japanese}%
        {en}{\PJL@config@Latin\PJLlang@langconfig@english}%
        {english}{\PJL@config@Latin\PJLlang@langconfig@english}%
        {fr}{\PJL@config@Latin\PJLlang@langconfig@french}%
        {french}{\PJL@config@Latin\PJLlang@langconfig@french}%
        {de}{\PJL@config@Latin\PJLlang@langconfig@german}%
        {ngerman}{\PJL@config@Latin\PJLlang@langconfig@german}%
        {german}{\PJL@config@Latin\PJLlang@langconfig@german}%
        {it}{\PJL@config@Latin\PJLlang@langconfig@italian}%
        {italian}{\PJL@config@Latin\PJLlang@langconfig@italian}%
        {pt}{\PJL@config@Latin\PJLlang@langconfig@portuguese}%
        {portuguese}{\PJL@config@Latin\PJLlang@langconfig@portuguese}%
        {br}{\PJL@config@Latin\PJLlang@langconfig@brazilian}%
        {brazilian}{\PJL@config@Latin\PJLlang@langconfig@brazilian}%
        {es}{\PJL@config@Latin\PJLlang@langconfig@spanish}%
        {spanish}{\PJL@config@Latin\PJLlang@langconfig@spanish}%
        {ru}{\PJL@config@Latin\PJLlang@langconfig@russian}%
        {russian}{\PJL@config@Latin\PJLlang@langconfig@russian}%
    }%
}
\newcommand{\UseLanguage}[1]{%
    \ifx\@onlypreamble\@notprerr%
        \UseLanguageCORE{#1}%
    \else%
        \AfterEndPreamble{\UseLanguageCORE{#1}}%
    \fi%
}
\newcommand{\UseOtherLanguage}[2]{%
\begingroup%
    \PJLlang@langconfig@common%
    \lowercase{\IfStrEqCase{#1}}{%
        {cn}{\PJLlang@langconfig@chinese}%
        {chinese}{\PJLlang@langconfig@chinese}%
        {schinese}{\PJLlang@langconfig@chinese}%
        {simplifiedchinese}{\PJLlang@langconfig@chinese}%
        {tc}{\PJLlang@langconfig@tchinese}%
        {tchinese}{\PJLlang@langconfig@tchinese}%
        {traditionalchinese}{\PJLlang@langconfig@tchinese}%
        {jp}{\PJLlang@langconfig@japanese}%
        {japanese}{\PJLlang@langconfig@japanese}%
        {en}{\PJLlang@langconfig@english}%
        {english}{\PJLlang@langconfig@english}%
        {fr}{\PJLlang@langconfig@french}%
        {french}{\PJLlang@langconfig@french}%
        {de}{\PJLlang@langconfig@german}%
        {ngerman}{\PJLlang@langconfig@german}%
        {german}{\PJLlang@langconfig@german}%
        {it}{\PJLlang@langconfig@italian}%
        {italian}{\PJLlang@langconfig@italian}%
        {pt}{\PJLlang@langconfig@portuguese}%
        {portuguese}{\PJLlang@langconfig@portuguese}%
        {br}{\PJLlang@langconfig@brazilian}%
        {brazilian}{\PJLlang@langconfig@brazilian}%
        {es}{\PJLlang@langconfig@spanish}%
        {spanish}{\PJLlang@langconfig@spanish}%
        {ru}{\PJLlang@langconfig@russian}%
        {russian}{\PJLlang@langconfig@russian}%
    }%
    #2%
\endgroup%
}

\IfStrEqCase{\PJLlang@mainlang}{%
    {EN}{\UseLanguage{EN}}%
    {FR}{\UseLanguage{FR}}%
    {DE}{\UseLanguage{DE}}%
    {IT}{\UseLanguage{IT}}%
    {PT}{\UseLanguage{PT}}%
    {BR}{\UseLanguage{BR}}%
    {ES}{\UseLanguage{ES}}%
    {CN}{\UseLanguage{CN}}%
    {TC}{\UseLanguage{TC}}%
    {JP}{\UseLanguage{JP}}%
    {RU}{\UseLanguage{RU}}%
}

\endinput
%%
%% End of file `PJLlang.sty'.