blob: ae70de932cd18e427b0d71364185f696db117685 (
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
|
% arara: pdflatex: {shell: on}
\documentclass[nswissgerman]{article}
\usepackage[main={locale},other={pt-BR,fr-BE},date=full,time=full,timedata]{tex-locale}
\newcommand{\test}{%
\section{Document language \languagename\space
(\CurrentTrackedLanguageTag)}
\texttt{\string\today}: \today.
\texttt{\string\DTMcurrenttime}: \DTMcurrenttime.
(Obtained from \texttt{datetime2} package.)
\subsection{Locale Details}
Language: \CurrentLocaleLanguageNativeName.
Region: \CurrentLocaleRegionNativeName.
\subsection{Dates and Times (Obtained from Java)}
Today: \CurrentLocaleDate.
Time: \CurrentLocaleTime.
First day of the week:
\CurrentLocaleStandaloneDayName{\CurrentLocaleFirstDayIndex}.
Current month:
\CurrentLocaleStandaloneMonthName{\month}.
\par
Date pattern:
\texttt{\LocaleGetDialectAttribute{\CurrentTrackedDialect}{fulldatefmt}}.
\par
Apply pattern:
\CurrentLocaleApplyDateTimePattern{fulldatefmt}{\LocaleDateTimeInfo}.
\par
Time pattern:
\texttt{\LocaleGetDialectAttribute{\CurrentTrackedDialect}{fulltimefmt}}.
\par
Apply pattern:
\CurrentLocaleApplyDateTimePattern{fulltimefmt}{\LocaleDateTimeInfo}.
\subsection{Numeric}
Numeric symbols:
\CurrentLocaleNumericGroupSep\ (group separator)
\CurrentLocaleDecimalSep\ (decimal separator)
\CurrentLocaleMonetarySep\ (monetary separator)
\CurrentLocaleExponent\ (exponent)
\CurrentLocalePercent\ (percent)
\CurrentLocalePermill\ (per mill).
\par
Uses numeric group separator:
\CurrentLocaleIfNumericUsesGroup{yes}{no}.
\par
Currency Symbol: \CurrentLocaleCurrency
\par
Integer:
\texosqueryfmtnumber{\CurrentLocaleIntegerPattern}{123456}{0}{0}
\par
Decimal:
\texosqueryfmtnumber{\CurrentLocaleDecimalPattern}{123456}{78}{0}
\par
Percentage:
\texosqueryfmtnumber{\CurrentLocalePercentPattern}{0}{65}{0}
\par
Currency:
\texosqueryfmtnumber{\CurrentLocaleCurrencyPattern}{1234567}{0}{0}\par
}
\begin{document}
\section{General Information}
OS name: \LocaleOSname.
OS version: \LocaleOSversion.
OS arch: \LocaleOSarch.
Default file encoding: \LocaleOScodeset.
The PDF file was last built: \texttt{\LocaleNowStamp}.
The source file was last modified: \texttt{\LocaleFileMod}.
Main locale: \LocaleMain\ (\LocaleMainDialect).
Other locales: \LocaleOther.
\test
\selectlocale{de-CH-1996}
\test
\selectlocale{fr-BE}
\test
\selectlocale{pt-BR}
\test
\end{document}
|