summaryrefslogtreecommitdiff
path: root/macros/generic/tracklang/samples/sample-tracklang4.tex
blob: 5c382234a2979c6d5851ceb3701a591654ff60e0 (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
% arara: xelatex
\documentclass[a4paper]{article}

\usepackage{fontspec}

\usepackage{polyglossia}

\setotherlanguages{french,dutch}
\setmainlanguage[variant=british]{english}

\usepackage{tracklang}

\begin{document}

Languages:
\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage\space
(ISO \TwoLetterIsoLanguageCode: ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}''). }

Dialects: \ForEachTrackedDialect{\ThisDialect}{\ThisDialect\space 
(\IfTrackedLanguageHasIsoCode{\TwoLetterIsoCountryCode}{\ThisDialect}%
 {ISO \TwoLetterIsoCountryCode: 
  ``\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}''}%
 {no specific region};
root: \TrackedLanguageFromDialect{\ThisDialect}). }

Variants aren't detected with polyglossia.
\end{document}