summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale2.tex')
-rw-r--r--Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale2.tex89
1 files changed, 89 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale2.tex b/Master/texmf-dist/doc/generic/tex-locale/samples/sample-locale2.tex
new file mode 100644
index 00000000000..ae70de932cd
--- /dev/null
+++ b/Master/texmf-dist/doc/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}