summaryrefslogtreecommitdiff
path: root/macros/generic/tex-locale/samples
diff options
context:
space:
mode:
Diffstat (limited to 'macros/generic/tex-locale/samples')
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xe.pdfbin0 -> 17633 bytes
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xe.tex106
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xeltx.pdfbin0 -> 16236 bytes
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xeltx.tex109
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xeltx2.pdfbin0 -> 23225 bytes
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xeltx2.tex96
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xeltx3.pdfbin0 -> 36956 bytes
-rw-r--r--macros/generic/tex-locale/samples/sample-locale-xeltx3.tex64
-rw-r--r--macros/generic/tex-locale/samples/sample-locale.pdfbin0 -> 91348 bytes
-rw-r--r--macros/generic/tex-locale/samples/sample-locale.tex94
-rw-r--r--macros/generic/tex-locale/samples/sample-locale2.pdfbin0 -> 91386 bytes
-rw-r--r--macros/generic/tex-locale/samples/sample-locale2.tex89
12 files changed, 558 insertions, 0 deletions
diff --git a/macros/generic/tex-locale/samples/sample-locale-xe.pdf b/macros/generic/tex-locale/samples/sample-locale-xe.pdf
new file mode 100644
index 0000000000..b5de82c18a
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xe.pdf
Binary files differ
diff --git a/macros/generic/tex-locale/samples/sample-locale-xe.tex b/macros/generic/tex-locale/samples/sample-locale-xe.tex
new file mode 100644
index 0000000000..b64aff8d91
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xe.tex
@@ -0,0 +1,106 @@
+% arara: xetex
+
+% If texosquery.cfg is correctly set up to use texosquery-jre8
+% this should work in restricted mode. The texosquery.cfg
+% default settings require --shell-escape
+
+\font\nimbus="NimbusRoman-Regular" at 10pt
+\font\nimbusbf="NimbusRoman-Bold" at 10pt
+\font\nimbustt="NimbusMonoPS-Regular" at 10pt
+\nimbus
+
+% If \LocaleMain isn't defined, the locale will be obtained
+% from the operating system.
+%\def\LocaleMain{en-GB}
+% \LocaleOther may be a comma-separated list of language tags
+% denoting the other locales required by the document.
+\def\LocaleOther{fr-BE}
+% The above need to be defined before tex-locale.tex is input
+
+\input tex-locale
+
+This is a sample plain XeTeX document that uses
+{\nimbustt tex-locale.tex} and {\nimbustt texosquery} to obtain locale information
+from the operating system.
+
+{\nimbusbf General Information}
+
+OS name: \LocaleOSname.
+OS version: {\nimbustt \LocaleOSversion}.
+OS arch: \LocaleOSarch.
+
+PDF now: {\nimbustt \LocaleNowStamp}.
+Tag: \LocaleOStag.
+
+\ifx\LocaleMainFile\empty
+\else
+ File {\nimbustt \LocaleMainFile} last modified:
+ {\nimbustt \LocaleFileMod}.
+\fi
+
+Main locale: {\nimbustt \LocaleMain} ({\nimbustt \LocaleMainDialect}).
+
+\ForEachTrackedDialect{\thisdialect}{%
+ % Iterate over each tracked dialect.
+ {\nimbusbf \LocaleLanguageTag{\thisdialect}}
+
+ Dialect label: {\nimbustt \thisdialect}.
+ Language name: \LocaleLanguageNativeName{\thisdialect}
+ (\LocaleLanguageName{\thisdialect}).
+ \LocaleIfHasRegionName{\thisdialect}%
+ {%
+ Region name: \LocaleRegionNativeName{\thisdialect}
+ (\LocaleRegionName{\thisdialect})%
+ }%
+ {No region name}.
+ \LocaleIfHasVariantName{\thisdialect}%
+ {%
+ Variant name: \LocaleVariantNativeName{\thisdialect}
+ (\LocaleVariantName{\thisdialect})%
+ }%
+ {No variant name}.
+
+ Full date: \LocaleFullDate{\thisdialect}.
+ Long date: \LocaleLongDate{\thisdialect}.
+ Medium date: \LocaleMediumDate{\thisdialect}.
+ Short date: \LocaleShortDate{\thisdialect}.
+ First day of week: \LocaleFirstDayIndex{\thisdialect}
+ (\LocaleDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}
+ / \LocaleShortDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}).
+
+ Current month: \LocaleMonthName{\thisdialect}{\month} /
+ \LocaleShortMonthName{\thisdialect}{\month}.
+
+ Standalone (display form) first day of week:
+ \LocaleStandaloneDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}
+ / \LocaleStandaloneShortDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}.
+
+ Standalone (display form) current month:
+ \LocaleStandaloneMonthName{\thisdialect}{\month} /
+ \LocaleStandaloneShortMonthName{\thisdialect}{\month}.
+
+ Full time: \LocaleFullTime{\thisdialect}.
+ Long time: \LocaleLongTime{\thisdialect}.
+ Medium time: \LocaleMediumTime{\thisdialect}.
+ Short time: \LocaleShortTime{\thisdialect}.
+
+ Numeric: \LocaleNumericGroupSep{\thisdialect} (group sep)
+ \LocaleNumericDecimalSep{\thisdialect} (decimal sep)
+ \LocaleNumericMonetarySep{\thisdialect} (monetary sep)
+ \LocaleNumericExponent{\thisdialect} (exponent symbol).
+ \LocaleNumericPercent{\thisdialect} (percent symbol).
+ \LocaleNumericPermill{\thisdialect} (permill symbol).
+ \LocaleIfNumericUsesGroup{\thisdialect}{Uses}{Doesn't use}
+ numeric group separator.
+
+ Currency label:
+ \LocaleCurrencyLabel{\thisdialect}
+ (\LocaleCurrencyRegionalLabel{\thisdialect}).
+
+ Currency symbol:
+ \LocaleCurrencySymbol{\thisdialect}
+ (\LocaleCurrencyTeXSymbol{\thisdialect}).
+
+}
+
+\bye
diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx.pdf b/macros/generic/tex-locale/samples/sample-locale-xeltx.pdf
new file mode 100644
index 0000000000..c2c31f1038
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xeltx.pdf
Binary files differ
diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx.tex b/macros/generic/tex-locale/samples/sample-locale-xeltx.tex
new file mode 100644
index 0000000000..8f5ce375ef
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xeltx.tex
@@ -0,0 +1,109 @@
+% arara: xelatex
+
+% If texosquery.cfg is correctly set up to use texosquery-jre8
+% this should work in restricted mode. The texosquery.cfg
+% default settings require --shell-escape
+
+\documentclass{article}
+
+\usepackage{tex-locale}
+
+\begin{document}
+
+\section{General Information}
+
+OS name: \LocaleOSname.
+OS version: \texttt{\LocaleOSversion}.
+OS arch: \LocaleOSarch.
+
+PDF now: \texttt{\LocaleNowStamp}.
+Tag: \LocaleOStag.
+
+\ifx\LocaleMainFile\empty
+\else
+ File \texttt{\LocaleMainFile} last modified:
+ \texttt{\LocaleFileMod}.
+\fi
+
+Main locale: \texttt{\LocaleMain} (\texttt{\LocaleMainDialect}).
+
+\newcount\tmpctr
+
+\ForEachTrackedDialect{\thisdialect}{%
+ \section{\LocaleLanguageTag{\thisdialect}}
+
+ Dialect label: \texttt{\thisdialect}.
+ Language name: \LocaleLanguageNativeName{\thisdialect}
+ (\LocaleLanguageName{\thisdialect}).
+ \LocaleIfHasRegionName{\thisdialect}%
+ {%
+ Region name: \LocaleRegionNativeName{\thisdialect}
+ (\LocaleRegionName{\thisdialect})%
+ }%
+ {No region name}.
+ \LocaleIfHasVariantName{\thisdialect}%
+ {%
+ Variant name: \LocaleVariantNativeName{\thisdialect}
+ (\LocaleVariantName{\thisdialect})%
+ }%
+ {No variant name}.
+
+ Full date: \LocaleFullDate{\thisdialect}.
+ Long date: \LocaleLongDate{\thisdialect}.
+ Medium date: \LocaleMediumDate{\thisdialect}.
+ Short date: \LocaleShortDate{\thisdialect}.
+ First day of week: \LocaleFirstDayIndex{\thisdialect}
+ (\LocaleDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}
+ / \LocaleShortDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}).
+
+ Days of the week:%
+ \tmpctr=0\relax
+ \loop
+ \space\LocaleDayName{\thisdialect}{\tmpctr}%
+ \advance\tmpctr by 1
+ \ifnum\tmpctr<7
+ \repeat.
+
+ Short days of the week:%
+ \tmpctr=0\relax
+ \loop
+ \space\LocaleShortDayName{\thisdialect}{\tmpctr}%
+ \advance\tmpctr by 1
+ \ifnum\tmpctr<7
+ \repeat.
+
+ Current month: \LocaleMonthName{\thisdialect}{\month} /
+ \LocaleShortMonthName{\thisdialect}{\month}.
+
+ Standalone (display form) first day of week:
+ \LocaleStandaloneDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}
+ / \LocaleStandaloneShortDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}.
+
+ Standalone (display form) current month:
+ \LocaleStandaloneMonthName{\thisdialect}{\month} /
+ \LocaleStandaloneShortMonthName{\thisdialect}{\month}.
+
+ Full time: \LocaleFullTime{\thisdialect}.
+ Long time: \LocaleLongTime{\thisdialect}.
+ Medium time: \LocaleMediumTime{\thisdialect}.
+ Short time: \LocaleShortTime{\thisdialect}.
+
+ Numeric: \LocaleNumericGroupSep{\thisdialect} (group sep)
+ \LocaleNumericDecimalSep{\thisdialect} (decimal sep)
+ \LocaleNumericMonetarySep{\thisdialect} (monetary sep)
+ \LocaleNumericExponent{\thisdialect} (exponent symbol).
+ \LocaleNumericPercent{\thisdialect} (percent symbol).
+ \LocaleNumericPermill{\thisdialect} (permill symbol).
+ \LocaleIfNumericUsesGroup{\thisdialect}{Uses}{Doesn't use}
+ numeric group separator.
+
+ Currency label:
+ \LocaleCurrencyLabel{\thisdialect}
+ (\LocaleCurrencyRegionalLabel{\thisdialect}).
+
+ Currency symbol:
+ \LocaleCurrencySymbol{\thisdialect}
+ (\LocaleCurrencyTeXSymbol{\thisdialect}).
+
+}
+\end{document}
diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx2.pdf b/macros/generic/tex-locale/samples/sample-locale-xeltx2.pdf
new file mode 100644
index 0000000000..3bb54c42c7
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xeltx2.pdf
Binary files differ
diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx2.tex b/macros/generic/tex-locale/samples/sample-locale-xeltx2.tex
new file mode 100644
index 0000000000..fad6ac3800
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xeltx2.tex
@@ -0,0 +1,96 @@
+% arara: xelatex
+\documentclass{article}
+
+\usepackage[other={pt-BR,de-CH-1996,fr-BE},timedata]{tex-locale}
+
+\setmainfont{STIX}
+
+\newcount\tmpctr
+
+\newcommand{\test}{%
+ \section{Document language \languagename\space
+ (\CurrentTrackedLanguageTag)}
+ \subsection{datetime2 commands}
+ \texttt{\string\today}: \today.
+ \texttt{\string\DTMcurrenttime}: \DTMcurrenttime.
+ \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}
+ (index: \CurrentLocaleFirstDayIndex).
+ Current month:
+ \CurrentLocaleStandaloneMonthName{\month}.
+ \par
+ Days of the week:%
+ \tmpctr=1\relax
+ \loop
+ \space
+ \CurrentLocaleStandaloneDayName
+ {\CurrentLocaleDayIndexFromRegion{\tmpctr}}%
+ \advance\tmpctr by 1
+ \ifnum\tmpctr<8
+ \repeat
+ .
+ \par
+ Full date-time pattern:
+ \texttt{\LocaleGetDialectAttribute{\CurrentTrackedDialect}{fulldatetimefmt}}
+ \par
+ Apply full date-time pattern:
+ \CurrentLocaleApplyDateTimePattern{fulldatetimefmt}{\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}
+}
+
+\renewcommand*{\localedatetimefmt}[1]{\localenopolypunct{#1}}
+
+\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.
+
+\ForEachTrackedLanguage{\thislanguage}
+{%
+ \selectlanguage{\thislanguage}
+ \test
+}
+
+\end{document}
diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx3.pdf b/macros/generic/tex-locale/samples/sample-locale-xeltx3.pdf
new file mode 100644
index 0000000000..c4f8127b41
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xeltx3.pdf
Binary files differ
diff --git a/macros/generic/tex-locale/samples/sample-locale-xeltx3.tex b/macros/generic/tex-locale/samples/sample-locale-xeltx3.tex
new file mode 100644
index 0000000000..e7039a1ea2
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale-xeltx3.tex
@@ -0,0 +1,64 @@
+% arara: xelatex: {shell: on}
+\documentclass{article}
+
+\usepackage[main={sr-Cyrl-RS},other={en-GB},date=full]{tex-locale}
+
+\LocaleSupportPackageCase
+{\newcommand{\textenglish}[1]{\foreignlanguage{british}{#1}}}% babel
+{% polyglossia
+ \setmainfont{Liberation Serif}
+ \setmonofont{Liberation Mono}
+ \newfontfamily\cyrillicfont{Liberation Serif}
+ \newfontfamily\cyrillicfonttt{Liberation Mono}
+}
+{\newcommand{\textenglish}[1]{#1}}% none
+
+\newcount\tmpctr
+
+\newcommand{\test}{%
+ \section{\textenglish{Document language} \languagename}
+ \subsection{\textenglish{datetime2 commands}}
+ \textenglish{\texttt{\string\today}}: \today.
+ \textenglish{\texttt{\string\DTMcurrenttime}}: \DTMcurrenttime.
+ \subsection{\textenglish{Locale Details}}
+ \textenglish{Language:} \CurrentLocaleLanguageNativeName.
+ \textenglish{Region:} \CurrentLocaleRegionNativeName.
+ \subsection{\textenglish{Dates and Times (Obtained from Java)}}
+ \textenglish{Today:} \CurrentLocaleDate.
+ \textenglish{Time:} \CurrentLocaleTime.
+ \textenglish{First day of the week:}
+ \CurrentLocaleStandaloneDayName{\CurrentLocaleFirstDayIndex}
+ (\textenglish{index:} \CurrentLocaleFirstDayIndex).
+ \textenglish{Current month:}
+ \CurrentLocaleStandaloneMonthName{\month}.
+ \par
+ \textenglish{Days of the week:}%
+ \tmpctr=1\relax
+ \loop
+ \space
+ \CurrentLocaleStandaloneDayName
+ {\CurrentLocaleDayIndexFromRegion{\tmpctr}}%
+ \advance\tmpctr by 1
+ \ifnum\tmpctr<8
+ \repeat
+ .
+ \subsection{\textenglish{Numeric}}
+ \textenglish{Numeric symbols:}
+ \CurrentLocaleNumericGroupSep\ \textenglish{(group separator)}
+ \CurrentLocaleDecimalSep\ \textenglish{(decimal separator)}
+ \CurrentLocaleMonetarySep\ \textenglish{(monetary separator)}
+ \CurrentLocaleExponent\ \textenglish{(exponent)}
+ \CurrentLocalePercent\ \textenglish{(percent)}
+ \CurrentLocalePermill\ \textenglish{(per mill).}
+ \par
+ \textenglish{Uses numeric group separator:
+ \CurrentLocaleIfNumericUsesGroup{yes}{no}.}
+ \par
+ \textenglish{Currency:} \CurrentLocaleCurrency
+}
+
+\begin{document}
+
+\test
+
+\end{document}
diff --git a/macros/generic/tex-locale/samples/sample-locale.pdf b/macros/generic/tex-locale/samples/sample-locale.pdf
new file mode 100644
index 0000000000..91dcabbeb3
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale.pdf
Binary files differ
diff --git a/macros/generic/tex-locale/samples/sample-locale.tex b/macros/generic/tex-locale/samples/sample-locale.tex
new file mode 100644
index 0000000000..4c5050bfc7
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale.tex
@@ -0,0 +1,94 @@
+% arara: pdflatex
+
+% If texosquery.cfg is correctly set up to use texosquery-jre8
+% this should work in restricted mode. The texosquery.cfg
+% default settings require --shell-escape
+
+\documentclass{article}
+
+\usepackage{tex-locale}
+
+\title{Sample Document Illustrating the tex-locale package}
+\author{Nicola Talbot}
+
+\begin{document}
+\maketitle
+
+texosquery version: \texttt{\TeXOSInvokerName\
+\csname ver@texosquery.tex\endcsname}.
+OS name: \LocaleOSname.
+OS version: \LocaleOSversion.
+OS arch: \LocaleOSarch.
+PDF now: \LocaleNowStamp.
+(Compare \verb|\pdfcreationdate|: \pdfcreationdate.)
+Tag: \LocaleOStag.
+Codeset: \LocaleOScodeset.
+
+\ifx\LocaleMainFile\empty
+\else
+ File \texttt{\LocaleMainFile} last modified:
+ \texttt{\LocaleFileMod}.
+\fi
+
+Main locale: \texttt{\LocaleMain} (\texttt{\LocaleMainDialect}).
+
+\ForEachTrackedDialect{\thisdialect}{%
+ \section{\LocaleLanguageTag{\thisdialect}}
+
+ Dialect label: \texttt{\thisdialect}.
+ Language name: \LocaleLanguageNativeName{\thisdialect}
+ (\LocaleLanguageName{\thisdialect}).
+ \LocaleIfHasRegionName{\thisdialect}%
+ {%
+ Region name: \LocaleRegionNativeName{\thisdialect}
+ (\LocaleRegionName{\thisdialect})%
+ }%
+ {No region name}.
+ \LocaleIfHasVariantName{\thisdialect}%
+ {%
+ Variant name: \LocaleVariantNativeName{\thisdialect}
+ (\LocaleVariantName{\thisdialect})%
+ }%
+ {No variant name}.
+
+ Full date: \LocaleFullDate{\thisdialect}.
+ Long date: \LocaleLongDate{\thisdialect}.
+ Medium date: \LocaleMediumDate{\thisdialect}.
+ Short date: \LocaleShortDate{\thisdialect}.
+ First day of week: \LocaleFirstDayIndex{\thisdialect}
+ (\LocaleDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}
+ / \LocaleShortDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}).
+
+ Current month: \LocaleMonthName{\thisdialect}{\month} /
+ \LocaleShortMonthName{\thisdialect}{\month}.
+
+ Standalone (display form) first day of week:
+ \LocaleStandaloneDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}
+ / \LocaleStandaloneShortDayName{\thisdialect}{\LocaleFirstDayIndex{\thisdialect}}.
+
+ Standalone (display form) current month:
+ \LocaleStandaloneMonthName{\thisdialect}{\month} /
+ \LocaleStandaloneShortMonthName{\thisdialect}{\month}.
+
+ Full time: \LocaleFullTime{\thisdialect}.
+ Long time: \LocaleLongTime{\thisdialect}.
+ Medium time: \LocaleMediumTime{\thisdialect}.
+ Short time: \LocaleShortTime{\thisdialect}.
+
+ Numeric: \LocaleNumericGroupSep{\thisdialect} (group sep)
+ \LocaleNumericDecimalSep{\thisdialect} (decimal sep)
+ \LocaleNumericMonetarySep{\thisdialect} (monetary sep)
+ \LocaleNumericExponent{\thisdialect} (exponent symbol).
+ \LocaleNumericPercent{\thisdialect} (percent symbol).
+ \LocaleNumericPermill{\thisdialect} (permill symbol).
+ \LocaleIfNumericUsesGroup{\thisdialect}{Uses}{Doesn't use}
+ numeric group separator.
+
+ Currency label:
+ \LocaleCurrencyLabel{\thisdialect}
+ (\LocaleCurrencyRegionalLabel{\thisdialect}).
+
+ Currency symbol:
+ \LocaleCurrencyTeXSymbol{\thisdialect}.
+}
+\end{document}
diff --git a/macros/generic/tex-locale/samples/sample-locale2.pdf b/macros/generic/tex-locale/samples/sample-locale2.pdf
new file mode 100644
index 0000000000..71ce9ba3c7
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale2.pdf
Binary files differ
diff --git a/macros/generic/tex-locale/samples/sample-locale2.tex b/macros/generic/tex-locale/samples/sample-locale2.tex
new file mode 100644
index 0000000000..ae70de932c
--- /dev/null
+++ b/macros/generic/tex-locale/samples/sample-locale2.tex
@@ -0,0 +1,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}