% 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}