summaryrefslogtreecommitdiff
path: root/macros/generic/tracklang/samples
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/generic/tracklang/samples
Initial commit
Diffstat (limited to 'macros/generic/tracklang/samples')
-rw-r--r--macros/generic/tracklang/samples/animals/animals-en-GB.ldf10
-rw-r--r--macros/generic/tracklang/samples/animals/animals-en-US.ldf10
-rw-r--r--macros/generic/tracklang/samples/animals/animals-english.ldf9
-rw-r--r--macros/generic/tracklang/samples/animals/animals-german.ldf9
-rw-r--r--macros/generic/tracklang/samples/animals/animals.sty24
-rw-r--r--macros/generic/tracklang/samples/animals/animals2-en-GB.ldf17
-rw-r--r--macros/generic/tracklang/samples/animals/animals2-en-US.ldf16
-rw-r--r--macros/generic/tracklang/samples/animals/animals2-english.ldf9
-rw-r--r--macros/generic/tracklang/samples/animals/animals2-german.ldf9
-rw-r--r--macros/generic/tracklang/samples/animals/animals2.sty39
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-babel.pdfbin0 -> 14855 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-babel.tex26
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-de-poly.pdfbin0 -> 3859 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-de-poly.tex15
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-de.pdfbin0 -> 13625 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-de.tex14
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-poly.pdfbin0 -> 3593 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals-poly.tex15
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals.pdfbin0 -> 12656 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals.tex19
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de.pdfbin0 -> 13625 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de.tex14
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de2.pdfbin0 -> 13625 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de2.tex14
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de3.pdfbin0 -> 13607 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de3.tex14
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de4.pdfbin0 -> 3859 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-de4.tex15
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-poly.pdfbin0 -> 3595 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2-poly.tex15
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2.pdfbin0 -> 12656 bytes
-rw-r--r--macros/generic/tracklang/samples/animals/sample-animals2.tex22
-rw-r--r--macros/generic/tracklang/samples/regions/regions-BE.ldf9
-rw-r--r--macros/generic/tracklang/samples/regions/regions-CA.ldf9
-rw-r--r--macros/generic/tracklang/samples/regions/regions-GB.ldf9
-rw-r--r--macros/generic/tracklang/samples/regions/regions-IM.ldf9
-rw-r--r--macros/generic/tracklang/samples/regions/regions-US.ldf9
-rw-r--r--macros/generic/tracklang/samples/regions/regions-dutch.ldf7
-rw-r--r--macros/generic/tracklang/samples/regions/regions-english.ldf7
-rw-r--r--macros/generic/tracklang/samples/regions/regions-french.ldf7
-rw-r--r--macros/generic/tracklang/samples/regions/regions-german.ldf7
-rw-r--r--macros/generic/tracklang/samples/regions/regions-italian.ldf7
-rw-r--r--macros/generic/tracklang/samples/regions/regions-manx.ldf7
-rw-r--r--macros/generic/tracklang/samples/regions/regions.sty43
-rw-r--r--macros/generic/tracklang/samples/regions/regions2.sty46
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions.pdfbin0 -> 13161 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions.tex13
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-manx.pdfbin0 -> 19785 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-manx.tex10
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-map.pdfbin0 -> 26000 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-map.tex32
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-map2.pdfbin0 -> 25852 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-map2.tex29
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-map3.pdfbin0 -> 24924 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-map3.tex23
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-nomap.pdfbin0 -> 25468 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2-nomap.tex21
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2.pdfbin0 -> 14716 bytes
-rw-r--r--macros/generic/tracklang/samples/regions/sample-regions2.tex11
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang.pdfbin0 -> 19552 bytes
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang.tex42
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang2.pdfbin0 -> 19802 bytes
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang2.tex44
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang3.pdfbin0 -> 19814 bytes
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang3.tex44
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang4.pdfbin0 -> 6241 bytes
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang4.tex27
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang5.pdfbin0 -> 16914 bytes
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang5.tex24
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang6.pdfbin0 -> 19897 bytes
-rw-r--r--macros/generic/tracklang/samples/sample-tracklang6.tex43
71 files changed, 874 insertions, 0 deletions
diff --git a/macros/generic/tracklang/samples/animals/animals-en-GB.ldf b/macros/generic/tracklang/samples/animals/animals-en-GB.ldf
new file mode 100644
index 0000000000..ad4e2021a0
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals-en-GB.ldf
@@ -0,0 +1,10 @@
+\TrackLangProvidesResource{en-GB}[2016/10/06 v1.2]
+
+\TrackLangRequireResource{english}
+
+\providecommand*{\enGBanimals}{%
+ \englishanimals
+ \renewcommand*{\ladybirdname}{ladybird}%
+}
+
+\TrackLangAddToCaptions\enGBanimals
diff --git a/macros/generic/tracklang/samples/animals/animals-en-US.ldf b/macros/generic/tracklang/samples/animals/animals-en-US.ldf
new file mode 100644
index 0000000000..66489a0330
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals-en-US.ldf
@@ -0,0 +1,10 @@
+\TrackLangProvidesResource{en-US}[2016/10/06 v1.2]
+
+\TrackLangRequireResource{english}%
+
+\providecommand*{\enUSanimals}{%
+ \englishanimals
+ \renewcommand*{\ladybirdname}{ladybug}%
+}
+
+\TrackLangAddToCaptions\enUSanimals
diff --git a/macros/generic/tracklang/samples/animals/animals-english.ldf b/macros/generic/tracklang/samples/animals/animals-english.ldf
new file mode 100644
index 0000000000..5b40d67d20
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals-english.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{english}[2016/10/06 v1.2]
+
+\providecommand*{\englishanimals}{%
+ \renewcommand*{\catname}{cat}%
+ \renewcommand*{\dogname}{dog}%
+ \renewcommand*{\ladybirdname}{bishy-barney-bee}%
+}
+
+\TrackLangAddToCaptions\englishanimals
diff --git a/macros/generic/tracklang/samples/animals/animals-german.ldf b/macros/generic/tracklang/samples/animals/animals-german.ldf
new file mode 100644
index 0000000000..45f4852b4b
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals-german.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{german}[2016/10/06 v1.2]
+
+\providecommand*{\germananimals}{%
+ \renewcommand*{\catname}{Katze}%
+ \renewcommand*{\dogname}{Hund}%
+ \renewcommand*{\ladybirdname}{Marienk\"afer}%
+}
+
+\TrackLangAddToCaptions\germananimals
diff --git a/macros/generic/tracklang/samples/animals/animals.sty b/macros/generic/tracklang/samples/animals/animals.sty
new file mode 100644
index 0000000000..8b14d3b4ee
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals.sty
@@ -0,0 +1,24 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{animals}[2016/10/06 v1.2 (NLCT) Sample package to test tracklang.sty]
+
+\RequirePackage{tracklang}[2016/10/07]
+
+\DeclareOption*{\TrackLanguageTag{\CurrentOption}}
+\ProcessOptions
+
+
+% default definitions
+\newcommand\catname{cat}
+\newcommand\dogname{dog}
+\newcommand\ladybirdname{bishy-barney-bee}
+
+\AnyTrackedLanguages
+{%
+ \ForEachTrackedDialect{\this@dialect}{%
+ \TrackLangRequireDialect{animals}{\this@dialect}%
+ }%
+}
+{% no tracked languages, default already set up
+}
+
+\endinput
diff --git a/macros/generic/tracklang/samples/animals/animals2-en-GB.ldf b/macros/generic/tracklang/samples/animals/animals2-en-GB.ldf
new file mode 100644
index 0000000000..8e0d742425
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals2-en-GB.ldf
@@ -0,0 +1,17 @@
+\TrackLangProvidesResource{en-GB}[2016/10/06 v1.2]
+
+\providecommand*{\enGBanimals}{%
+ \englishanimals
+ \renewcommand*{\ladybirdname}{ladybird}%
+}
+
+\TrackLangRequireResourceOrDo{english}%
+{
+ \TrackLangAddToCaptions{%
+ \renewcommand*{\ladybirdname}{ladybird}%
+ }
+}
+{
+ \TrackLangAddToCaptions\enGBanimals
+}
+
diff --git a/macros/generic/tracklang/samples/animals/animals2-en-US.ldf b/macros/generic/tracklang/samples/animals/animals2-en-US.ldf
new file mode 100644
index 0000000000..ccc7672903
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals2-en-US.ldf
@@ -0,0 +1,16 @@
+\TrackLangProvidesResource{en-US}[2016/10/06 v1.2]
+
+\providecommand*{\enUSanimals}{%
+ \englishanimals
+ \renewcommand*{\ladybirdname}{ladybug}%
+}
+
+\TrackLangRequireResourceOrDo{english}
+{
+ \TrackLangAddToCaptions{%
+ \renewcommand*{\ladybirdname}{ladybird}%
+ }
+}
+{
+ \TrackLangAddToCaptions\enUSanimals
+}
diff --git a/macros/generic/tracklang/samples/animals/animals2-english.ldf b/macros/generic/tracklang/samples/animals/animals2-english.ldf
new file mode 100644
index 0000000000..5b40d67d20
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals2-english.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{english}[2016/10/06 v1.2]
+
+\providecommand*{\englishanimals}{%
+ \renewcommand*{\catname}{cat}%
+ \renewcommand*{\dogname}{dog}%
+ \renewcommand*{\ladybirdname}{bishy-barney-bee}%
+}
+
+\TrackLangAddToCaptions\englishanimals
diff --git a/macros/generic/tracklang/samples/animals/animals2-german.ldf b/macros/generic/tracklang/samples/animals/animals2-german.ldf
new file mode 100644
index 0000000000..45f4852b4b
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals2-german.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{german}[2016/10/06 v1.2]
+
+\providecommand*{\germananimals}{%
+ \renewcommand*{\catname}{Katze}%
+ \renewcommand*{\dogname}{Hund}%
+ \renewcommand*{\ladybirdname}{Marienk\"afer}%
+}
+
+\TrackLangAddToCaptions\germananimals
diff --git a/macros/generic/tracklang/samples/animals/animals2.sty b/macros/generic/tracklang/samples/animals/animals2.sty
new file mode 100644
index 0000000000..88ca25139a
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/animals2.sty
@@ -0,0 +1,39 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{animals2}[2016/10/06 v1.2 (NLCT) Sample package to test tracklang.sty]
+
+\RequirePackage{tracklang}[2016/10/07]
+
+\DeclareOption*{\TrackLanguageTag{\CurrentOption}}
+\ProcessOptions
+
+\AnyTrackedLanguages
+{}
+{% fetch locale information from the operating system
+ \ifx\TeXOSQueryLangTag\undefined
+ \TrackLangFromEnv
+ \else
+ % texosquery v1.2 available
+ \TeXOSQueryLangTag{\langtag}
+ \TrackLanguageTag{\langtag}
+ \fi
+}
+
+% default definitions
+\newcommand\catname{cat}
+\newcommand\dogname{dog}
+\newcommand\ladybirdname{bishy-barney-bee}
+
+\newcommand*{\RequireAnimalsDialect}[1]{%
+ \TrackLangRequireDialect{animals2}{#1}%
+}
+
+\AnyTrackedLanguages
+{%
+ \ForEachTrackedDialect{\this@dialect}{%
+ \RequireAnimalsDialect\this@dialect
+ }%
+}
+{% no tracked languages, default already set up
+}
+
+\endinput
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-babel.pdf b/macros/generic/tracklang/samples/animals/sample-animals-babel.pdf
new file mode 100644
index 0000000000..526fd1af52
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-babel.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-babel.tex b/macros/generic/tracklang/samples/animals/sample-animals-babel.tex
new file mode 100644
index 0000000000..962e00f522
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-babel.tex
@@ -0,0 +1,26 @@
+% arara: pdflatex
+\documentclass[american,german,british]{article}
+
+\usepackage{babel}
+\usepackage{animals}
+
+\begin{document}
+\selectlanguage{american}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\selectlanguage{german}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\selectlanguage{british}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-de-poly.pdf b/macros/generic/tracklang/samples/animals/sample-animals-de-poly.pdf
new file mode 100644
index 0000000000..d29a53d2ef
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-de-poly.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-de-poly.tex b/macros/generic/tracklang/samples/animals/sample-animals-de-poly.tex
new file mode 100644
index 0000000000..bb96c76cd4
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-de-poly.tex
@@ -0,0 +1,15 @@
+% arara: xelatex
+\documentclass[a4paper]{article}
+
+\usepackage{polyglossia}
+\setmainlanguage{german}
+
+\usepackage{animals}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-de.pdf b/macros/generic/tracklang/samples/animals/sample-animals-de.pdf
new file mode 100644
index 0000000000..778e6e0e21
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-de.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-de.tex b/macros/generic/tracklang/samples/animals/sample-animals-de.tex
new file mode 100644
index 0000000000..ec24e8ee51
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-de.tex
@@ -0,0 +1,14 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[ngerman]{babel}
+
+\usepackage{animals}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-poly.pdf b/macros/generic/tracklang/samples/animals/sample-animals-poly.pdf
new file mode 100644
index 0000000000..8fb67bafc1
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-poly.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals-poly.tex b/macros/generic/tracklang/samples/animals/sample-animals-poly.tex
new file mode 100644
index 0000000000..33b7f4e93b
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals-poly.tex
@@ -0,0 +1,15 @@
+% arara: xelatex
+\documentclass[british,a4paper]{article}
+
+\usepackage{polyglossia}
+\setmainlanguage[variant=uk]{english}
+
+\usepackage{animals}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals.pdf b/macros/generic/tracklang/samples/animals/sample-animals.pdf
new file mode 100644
index 0000000000..cac9466213
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals.tex b/macros/generic/tracklang/samples/animals/sample-animals.tex
new file mode 100644
index 0000000000..85dc4dddf9
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals.tex
@@ -0,0 +1,19 @@
+% arara: pdflatex
+\documentclass[british,american,a4paper]{article}
+
+\usepackage{animals}
+
+\begin{document}
+\enGBanimals
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\enUSanimals
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de.pdf b/macros/generic/tracklang/samples/animals/sample-animals2-de.pdf
new file mode 100644
index 0000000000..fcfa3e82ea
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de.tex b/macros/generic/tracklang/samples/animals/sample-animals2-de.tex
new file mode 100644
index 0000000000..20158ec8f4
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de.tex
@@ -0,0 +1,14 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[ngerman]{babel}
+
+\usepackage{animals2}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de2.pdf b/macros/generic/tracklang/samples/animals/sample-animals2-de2.pdf
new file mode 100644
index 0000000000..73fe437538
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de2.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de2.tex b/macros/generic/tracklang/samples/animals/sample-animals2-de2.tex
new file mode 100644
index 0000000000..3792d8f271
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de2.tex
@@ -0,0 +1,14 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage{ngerman}
+
+\usepackage{animals2}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de3.pdf b/macros/generic/tracklang/samples/animals/sample-animals2-de3.pdf
new file mode 100644
index 0000000000..0db2008c60
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de3.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de3.tex b/macros/generic/tracklang/samples/animals/sample-animals2-de3.tex
new file mode 100644
index 0000000000..3895f3c3a1
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de3.tex
@@ -0,0 +1,14 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[ngerman]{translator}
+
+\usepackage{animals2}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de4.pdf b/macros/generic/tracklang/samples/animals/sample-animals2-de4.pdf
new file mode 100644
index 0000000000..e09a02d474
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de4.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-de4.tex b/macros/generic/tracklang/samples/animals/sample-animals2-de4.tex
new file mode 100644
index 0000000000..c774718209
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-de4.tex
@@ -0,0 +1,15 @@
+% arara: xelatex
+\documentclass[a4paper]{article}
+
+\usepackage{polyglossia}
+\setmainlanguage{german}
+
+\usepackage{animals2}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-poly.pdf b/macros/generic/tracklang/samples/animals/sample-animals2-poly.pdf
new file mode 100644
index 0000000000..9fe91c3e1a
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-poly.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2-poly.tex b/macros/generic/tracklang/samples/animals/sample-animals2-poly.tex
new file mode 100644
index 0000000000..626556afb7
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2-poly.tex
@@ -0,0 +1,15 @@
+% arara: xelatex
+\documentclass[british,a4paper]{article}
+
+\usepackage{polyglossia}
+\setmainlanguage[variant=uk]{english}
+
+\usepackage{animals2}
+
+\begin{document}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2.pdf b/macros/generic/tracklang/samples/animals/sample-animals2.pdf
new file mode 100644
index 0000000000..ca98c4a150
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/animals/sample-animals2.tex b/macros/generic/tracklang/samples/animals/sample-animals2.tex
new file mode 100644
index 0000000000..e4ed01e5b0
--- /dev/null
+++ b/macros/generic/tracklang/samples/animals/sample-animals2.tex
@@ -0,0 +1,22 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[american,british]{babel}
+
+\usepackage{animals2}
+
+\begin{document}
+
+\selectlanguage{british}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\selectlanguage{american}
+
+\catname.
+\dogname.
+\ladybirdname.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/regions-BE.ldf b/macros/generic/tracklang/samples/regions/regions-BE.ldf
new file mode 100644
index 0000000000..7e8887518f
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-BE.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{BE}[2016/10/06 v1.2]
+
+\providecommand*{\BEunits}{%
+ \renewcommand*{\weightunit}{kg}%
+ \renewcommand*{\lengthunit}{mm}%
+ \renewcommand*{\currencyunit}{EUR}%
+}
+
+\TrackLangAddToCaptions\BEunits
diff --git a/macros/generic/tracklang/samples/regions/regions-CA.ldf b/macros/generic/tracklang/samples/regions/regions-CA.ldf
new file mode 100644
index 0000000000..709a6371b7
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-CA.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{CA}[2016/10/06 v1.2]
+
+\providecommand*{\CAunits}{%
+ \renewcommand*{\weightunit}{kg}%
+ \renewcommand*{\lengthunit}{mm}%
+ \renewcommand*{\currencyunit}{CAD}%
+}
+
+\TrackLangAddToCaptions\CAunits
diff --git a/macros/generic/tracklang/samples/regions/regions-GB.ldf b/macros/generic/tracklang/samples/regions/regions-GB.ldf
new file mode 100644
index 0000000000..85fe6d9713
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-GB.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{GB}[2016/10/06 v1.2]
+
+\providecommand*{\GBunits}{%
+ \renewcommand*{\weightunit}{kg}%
+ \renewcommand*{\lengthunit}{mm}%
+ \renewcommand*{\currencyunit}{GBP}%
+}
+
+\TrackLangAddToCaptions\GBunits
diff --git a/macros/generic/tracklang/samples/regions/regions-IM.ldf b/macros/generic/tracklang/samples/regions/regions-IM.ldf
new file mode 100644
index 0000000000..e39500087a
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-IM.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{IM}[2016/10/06 v1.2]
+
+\providecommand*{\IMunits}{%
+ \renewcommand*{\weightunit}{kg}%
+ \renewcommand*{\lengthunit}{mm}%
+ \renewcommand*{\currencyunit}{M\pounds}%
+}
+
+\TrackLangAddToCaptions\IMunits
diff --git a/macros/generic/tracklang/samples/regions/regions-US.ldf b/macros/generic/tracklang/samples/regions/regions-US.ldf
new file mode 100644
index 0000000000..ec69edfe01
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-US.ldf
@@ -0,0 +1,9 @@
+\TrackLangProvidesResource{US}[2016/10/06 v1.2]
+
+\providecommand*{\USunits}{%
+ \renewcommand*{\weightunit}{lb}%
+ \renewcommand*{\lengthunit}{in}%
+ \renewcommand*{\currencyunit}{USD}%
+}
+
+\TrackLangAddToCaptions\USunits
diff --git a/macros/generic/tracklang/samples/regions/regions-dutch.ldf b/macros/generic/tracklang/samples/regions/regions-dutch.ldf
new file mode 100644
index 0000000000..0c4384d27f
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-dutch.ldf
@@ -0,0 +1,7 @@
+\TrackLangProvidesResource{dutch}[2016/10/06 v1.2]
+
+\providecommand*{\dutchnames}{%
+ \renewcommand*{\unitname}{meeteenheden}%
+}
+
+\TrackLangAddToCaptions\dutchnames
diff --git a/macros/generic/tracklang/samples/regions/regions-english.ldf b/macros/generic/tracklang/samples/regions/regions-english.ldf
new file mode 100644
index 0000000000..2be20b808b
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-english.ldf
@@ -0,0 +1,7 @@
+\TrackLangProvidesResource{english}[2016/10/06 v1.2]
+
+\providecommand*{\englishnames}{%
+ \renewcommand*{\unitname}{units}%
+}
+
+\TrackLangAddToCaptions\englishnames
diff --git a/macros/generic/tracklang/samples/regions/regions-french.ldf b/macros/generic/tracklang/samples/regions/regions-french.ldf
new file mode 100644
index 0000000000..53392fc3c7
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-french.ldf
@@ -0,0 +1,7 @@
+\TrackLangProvidesResource{french}[2016/10/06 v1.2]
+
+\providecommand*{\frenchnames}{%
+ \renewcommand*{\unitname}{unit\'es}%
+}
+
+\TrackLangAddToCaptions\frenchnames
diff --git a/macros/generic/tracklang/samples/regions/regions-german.ldf b/macros/generic/tracklang/samples/regions/regions-german.ldf
new file mode 100644
index 0000000000..3be1461693
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-german.ldf
@@ -0,0 +1,7 @@
+\TrackLangProvidesResource{german}[2016/10/06 v1.2]
+
+\providecommand*{\germannames}{%
+ \renewcommand*{\unitname}{Ma\ss einheiten}%
+}
+
+\TrackLangAddToCaptions\germannames
diff --git a/macros/generic/tracklang/samples/regions/regions-italian.ldf b/macros/generic/tracklang/samples/regions/regions-italian.ldf
new file mode 100644
index 0000000000..ddbe9de433
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-italian.ldf
@@ -0,0 +1,7 @@
+\TrackLangProvidesResource{italian}[2016/10/06 v1.2]
+
+\providecommand*{\italiannames}{%
+ \renewcommand*{\unitname}{unit\`a di misura}%
+}
+
+\italiannames
diff --git a/macros/generic/tracklang/samples/regions/regions-manx.ldf b/macros/generic/tracklang/samples/regions/regions-manx.ldf
new file mode 100644
index 0000000000..2426d43b32
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions-manx.ldf
@@ -0,0 +1,7 @@
+\TrackLangProvidesResource{manx}[2016/10/06 v1.2]
+
+\providecommand*{\manxnames}{%
+ \renewcommand*{\unitname}{Ennym}% not right, but I don't know any Manx!
+}
+
+\TrackLangAddToCaptions\manxnames
diff --git a/macros/generic/tracklang/samples/regions/regions.sty b/macros/generic/tracklang/samples/regions/regions.sty
new file mode 100644
index 0000000000..3b942c4172
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions.sty
@@ -0,0 +1,43 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{regions}[2016/10/06 v1.2 (NLCT) Sample package to test tracklang.sty]
+
+\RequirePackage{tracklang}[2016/10/07]
+
+\DeclareOption*{\TrackLanguageTag{\CurrentOption}}
+\ProcessOptions
+
+\AnyTrackedLanguages
+{}
+{% fetch locale information from the operating system
+ \ifx\TeXOSQueryLangTag\undefined
+ \TrackLangFromEnv
+ \else
+ \TeXOSQueryLangTag{\langtag}
+ \TrackLanguageTag{\langtag}
+ \fi
+}
+
+\newcommand*{\weightunit}{kg}
+\newcommand*{\lengthunit}{mm}
+\newcommand*{\currencyunit}{}
+
+\newcommand*{\unitname}{units}
+
+\newcommand*{\RequireRegionsDialect}[1]{%
+ \TrackLangRequireDialect
+ [\TrackLangRequireResource{\CurrentTrackedTag}%
+ \TrackLangRequireResource{\CurrentTrackedLanguage}%
+ ]%
+ {regions}{#1}%
+}
+
+\AnyTrackedLanguages
+{%
+ \ForEachTrackedDialect{\this@dialect}{%
+ \RequireRegionsDialect\this@dialect
+ }%
+}
+{% no tracked languages, default already set up
+}
+
+\endinput
diff --git a/macros/generic/tracklang/samples/regions/regions2.sty b/macros/generic/tracklang/samples/regions/regions2.sty
new file mode 100644
index 0000000000..d7d0d99757
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/regions2.sty
@@ -0,0 +1,46 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{regions2}[2016/10/06 v1.2 (NLCT) Sample package to test tracklang.sty]
+
+\RequirePackage{tracklang}[2016/10/07]
+
+\DeclareOption*{\TrackLanguageTag{\CurrentOption}}
+\ProcessOptions
+
+\newcommand*{\weightunit}{kg}
+\newcommand*{\lengthunit}{mm}
+\newcommand*{\currencyunit}{EUR}
+
+\newcommand*{\unitname}{units}
+
+\newcommand*{\defaultunits}{%
+ \renewcommand*{\weightunit}{kg}%
+ \renewcommand*{\lengthunit}{mm}%
+ \renewcommand*{\currencyunit}{EUR}%
+}
+
+\newcommand*{\RequireRegionsDialect}[1]{%
+ \TrackLangRequireDialect
+ [\TrackLangRequireResource{\CurrentTrackedTag}%
+ \ifx\CurrentTrackedTag\CurrentTrackedLanguage
+ \ifx\CurrentTrackedRegion\empty
+ \TrackLangAddToCaptions{\defaultunits}%
+ \else
+ \TrackLangRequireResource{\CurrentTrackedRegion}%
+ \fi
+ \else
+ \TrackLangRequireResource{\CurrentTrackedLanguage}%
+ \fi
+ ]%
+ {regions}{#1}%
+}
+
+\AnyTrackedLanguages
+{%
+ \ForEachTrackedDialect{\this@dialect}{%
+ \RequireRegionsDialect\this@dialect
+ }%
+}
+{% no tracked languages, default already set up
+}
+
+\endinput
diff --git a/macros/generic/tracklang/samples/regions/sample-regions.pdf b/macros/generic/tracklang/samples/regions/sample-regions.pdf
new file mode 100644
index 0000000000..126660e534
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions.tex b/macros/generic/tracklang/samples/regions/sample-regions.tex
new file mode 100644
index 0000000000..8c6caa7116
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions.tex
@@ -0,0 +1,13 @@
+% arara: pdflatex
+%\documentclass[USenglish]{article}
+%\documentclass[canadian]{article}
+%\documentclass[canadien]{article}
+\documentclass{article}
+
+\usepackage{regions}
+
+\begin{document}
+
+\unitname: \weightunit, \lengthunit, \currencyunit.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-manx.pdf b/macros/generic/tracklang/samples/regions/sample-regions2-manx.pdf
new file mode 100644
index 0000000000..d969f2992f
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-manx.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-manx.tex b/macros/generic/tracklang/samples/regions/sample-regions2-manx.tex
new file mode 100644
index 0000000000..6ac72343ed
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-manx.tex
@@ -0,0 +1,10 @@
+% arara: pdflatex
+\documentclass[manx]{article}
+
+\usepackage{regions2}
+
+\begin{document}
+
+\unitname: \weightunit, \lengthunit, \currencyunit.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-map.pdf b/macros/generic/tracklang/samples/regions/sample-regions2-map.pdf
new file mode 100644
index 0000000000..1a12bd1f4d
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-map.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-map.tex b/macros/generic/tracklang/samples/regions/sample-regions2-map.tex
new file mode 100644
index 0000000000..b32c9eb130
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-map.tex
@@ -0,0 +1,32 @@
+% arara: pdflatex
+\documentclass{article}
+
+\usepackage{tracklang}
+
+\TrackLanguageTag{de-US-1996}
+\SetTrackedDialectLabelMap{\TrackLangLastTrackedDialect}{ngerman}
+
+\TrackLanguageTag{en-MT}
+\SetTrackedDialectLabelMap{\TrackLangLastTrackedDialect}{british}
+
+\usepackage[main=ngerman,british]{babel}
+\usepackage{regions2}
+
+\newcommand{\test}[1]{%
+ \section{#1}
+ \selectlanguage{#1}%
+ \SetCurrentTrackedDialect{#1}%
+ Language tag: \CurrentTrackedLanguageTag.
+ (tracklang dialect label: \CurrentTrackedDialect.)
+
+ \unitname: \weightunit, \lengthunit, \currencyunit.
+}
+
+
+\begin{document}
+
+\test{ngerman}
+
+\test{british}
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-map2.pdf b/macros/generic/tracklang/samples/regions/sample-regions2-map2.pdf
new file mode 100644
index 0000000000..2d1dc20f20
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-map2.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-map2.tex b/macros/generic/tracklang/samples/regions/sample-regions2-map2.tex
new file mode 100644
index 0000000000..e746f875d5
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-map2.tex
@@ -0,0 +1,29 @@
+% arara: pdflatex
+\documentclass{article}
+
+\usepackage{tracklang}
+
+\TrackLanguageTag{de-US-1996}
+\SetTrackedDialectLabelMap{\TrackLangLastTrackedDialect}{ngerman}
+
+\TrackLanguageTag{en-MT}
+
+\usepackage[main=ngerman,english]{babel}
+\usepackage{regions2}
+
+\newcommand{\test}[1]{%
+ \section{#1}
+ \selectlanguage{#1}%
+ \SetCurrentTrackedDialect{#1}%
+ Language tag: \CurrentTrackedLanguageTag.
+ (tracklang dialect label: \CurrentTrackedDialect.)
+
+ \unitname: \weightunit, \lengthunit, \currencyunit.
+}
+
+\begin{document}
+\test{ngerman}
+
+\test{english}
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-map3.pdf b/macros/generic/tracklang/samples/regions/sample-regions2-map3.pdf
new file mode 100644
index 0000000000..b2591931bf
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-map3.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-map3.tex b/macros/generic/tracklang/samples/regions/sample-regions2-map3.tex
new file mode 100644
index 0000000000..a7ad033613
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-map3.tex
@@ -0,0 +1,23 @@
+% arara: pdflatex
+\documentclass[ngermanDE,USenglish]{article}
+
+\usepackage[main=ngerman]{babel}
+\usepackage{regions2}
+
+\newcommand{\test}[1]{%
+ \section{#1}
+ \selectlanguage{#1}%
+ \SetCurrentTrackedDialect{#1}%
+ Language: \CurrentTrackedLanguageTag.
+
+ \unitname: \weightunit, \lengthunit, \currencyunit.
+}
+
+
+
+\begin{document}
+\test{USenglish}
+
+\test{ngerman}
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-nomap.pdf b/macros/generic/tracklang/samples/regions/sample-regions2-nomap.pdf
new file mode 100644
index 0000000000..3d44db0cf3
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-nomap.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2-nomap.tex b/macros/generic/tracklang/samples/regions/sample-regions2-nomap.tex
new file mode 100644
index 0000000000..f949bff8f3
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2-nomap.tex
@@ -0,0 +1,21 @@
+% arara: pdflatex
+\documentclass{article}
+
+\usepackage[main=ngerman,british]{babel}
+\usepackage{regions2}
+
+\newcommand{\test}[1]{%
+ \section{#1}
+ \selectlanguage{#1}%
+ \SetCurrentTrackedDialect{#1}%
+ Language: \CurrentTrackedLanguageTag.
+
+ \unitname: \weightunit, \lengthunit, \currencyunit.
+}
+
+\begin{document}
+\test{ngerman}
+
+\test{british}
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2.pdf b/macros/generic/tracklang/samples/regions/sample-regions2.pdf
new file mode 100644
index 0000000000..5d140fe792
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/regions/sample-regions2.tex b/macros/generic/tracklang/samples/regions/sample-regions2.tex
new file mode 100644
index 0000000000..3ffe08c664
--- /dev/null
+++ b/macros/generic/tracklang/samples/regions/sample-regions2.tex
@@ -0,0 +1,11 @@
+% arara: pdflatex
+\documentclass[ngerman]{article}
+
+\usepackage{regions2}
+
+\begin{document}
+Language: \languagename.
+
+\unitname: \weightunit, \lengthunit, \currencyunit.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/sample-tracklang.pdf b/macros/generic/tracklang/samples/sample-tracklang.pdf
new file mode 100644
index 0000000000..f8b99abdca
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/sample-tracklang.tex b/macros/generic/tracklang/samples/sample-tracklang.tex
new file mode 100644
index 0000000000..982982afdf
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang.tex
@@ -0,0 +1,42 @@
+% arara: pdflatex
+\documentclass[british,francais,american,canadian,canadien,dutch,a4paper]{article}
+
+\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}). }
+
+``english'' \IfTrackedDialect{english}{has}{hasn't} been specified.
+
+``british'' \IfTrackedDialect{british}{has}{hasn't} been specified.
+
+``flemish'' \IfTrackedDialect{flemish}{has}{hasn't} been specified.
+
+``dutch'' \IfTrackedDialect{dutch}{has}{hasn't} been specified.
+
+``english'' or an English variant
+\IfTrackedLanguage{english}{has}{hasn't} been specified.
+
+Language for ISO \TwoLetterIsoCountryCode\ ``GB'':
+\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{GB}.
+
+Language for ISO \TwoLetterIsoCountryCode\ ``CA'':
+\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{CA}.
+
+Country ISO \TwoLetterIsoCountryCode\ code for ``canadian'':
+\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{canadian}.
+
+Dialects for language ``english'':
+\TrackedDialectsFromLanguage{english}.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/sample-tracklang2.pdf b/macros/generic/tracklang/samples/sample-tracklang2.pdf
new file mode 100644
index 0000000000..f0d8a57457
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang2.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/sample-tracklang2.tex b/macros/generic/tracklang/samples/sample-tracklang2.tex
new file mode 100644
index 0000000000..67867a4237
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang2.tex
@@ -0,0 +1,44 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+\usepackage[francais,american,canadian,canadien,dutch,british]{babel}
+
+\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}). }
+
+``english'' \IfTrackedDialect{english}{has}{hasn't} been specified.
+
+``british'' \IfTrackedDialect{british}{has}{hasn't} been specified.
+
+``flemish'' \IfTrackedDialect{flemish}{has}{hasn't} been specified.
+
+``dutch'' \IfTrackedDialect{dutch}{has}{hasn't} been specified.
+
+``english'' or an English variant
+\IfTrackedLanguage{english}{has}{hasn't} been specified.
+
+Language for ISO \TwoLetterIsoCountryCode\ ``GB'':
+\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{GB}.
+
+Language for ISO \TwoLetterIsoCountryCode\ ``CA'':
+\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{CA}.
+
+Country ISO \TwoLetterIsoCountryCode\ code for ``canadian'':
+\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{canadian}.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/sample-tracklang3.pdf b/macros/generic/tracklang/samples/sample-tracklang3.pdf
new file mode 100644
index 0000000000..175e007831
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang3.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/sample-tracklang3.tex b/macros/generic/tracklang/samples/sample-tracklang3.tex
new file mode 100644
index 0000000000..414901bd55
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang3.tex
@@ -0,0 +1,44 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+\usepackage[francais,american,canadian,canadien,dutch,british]{translator}
+
+\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}). }
+
+``english'' \IfTrackedDialect{english}{has}{hasn't} been specified.
+
+``british'' \IfTrackedDialect{british}{has}{hasn't} been specified.
+
+``flemish'' \IfTrackedDialect{flemish}{has}{hasn't} been specified.
+
+``dutch'' \IfTrackedDialect{dutch}{has}{hasn't} been specified.
+
+``english'' or an English variant
+\IfTrackedLanguage{english}{has}{hasn't} been specified.
+
+Language for ISO \TwoLetterIsoCountryCode\ ``GB'':
+\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{GB}.
+
+Language for ISO \TwoLetterIsoCountryCode\ ``CA'':
+\TrackedLanguageFromIsoCode{\TwoLetterIsoCountryCode}{CA}.
+
+Country ISO \TwoLetterIsoCountryCode\ code for ``canadian'':
+\TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{canadian}.
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/sample-tracklang4.pdf b/macros/generic/tracklang/samples/sample-tracklang4.pdf
new file mode 100644
index 0000000000..7e2f14ba1b
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang4.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/sample-tracklang4.tex b/macros/generic/tracklang/samples/sample-tracklang4.tex
new file mode 100644
index 0000000000..5c382234a2
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang4.tex
@@ -0,0 +1,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}
diff --git a/macros/generic/tracklang/samples/sample-tracklang5.pdf b/macros/generic/tracklang/samples/sample-tracklang5.pdf
new file mode 100644
index 0000000000..84acb9ee4e
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang5.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/sample-tracklang5.tex b/macros/generic/tracklang/samples/sample-tracklang5.tex
new file mode 100644
index 0000000000..5428700b67
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang5.tex
@@ -0,0 +1,24 @@
+% arara: pdflatex
+\documentclass[a4paper]{article}
+
+\usepackage[utf8]{inputenc}
+\usepackage[T1]{fontenc}
+
+\usepackage{ngerman}
+
+\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}). }
+
+\end{document}
diff --git a/macros/generic/tracklang/samples/sample-tracklang6.pdf b/macros/generic/tracklang/samples/sample-tracklang6.pdf
new file mode 100644
index 0000000000..9f2e19cc58
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang6.pdf
Binary files differ
diff --git a/macros/generic/tracklang/samples/sample-tracklang6.tex b/macros/generic/tracklang/samples/sample-tracklang6.tex
new file mode 100644
index 0000000000..6f174f4a02
--- /dev/null
+++ b/macros/generic/tracklang/samples/sample-tracklang6.tex
@@ -0,0 +1,43 @@
+% arara: pdftex
+
+\input tracklang
+
+\TrackLangFromEnv % lookup LC_ALL or LANG
+Environment query results:
+language: \TrackLangEnvLang,
+territory: \TrackLangEnvTerritory,
+codeset: \TrackLangEnvCodeSet,
+modifier: \TrackLangEnvModifier.
+
+\TrackPredefinedDialect{british}
+\TrackPredefinedDialect{american}
+\TrackPredefinedDialect{canadian}
+\TrackPredefinedDialect{canadien}
+\TrackPredefinedDialect{belgique}
+
+\TrackLocale{de-NA@new}
+
+\TrackLocale{manx}
+
+Dialect Regions:
+
+\ForEachTrackedDialect{\ThisDialect}{\ThisDialect:
+ \TrackedIsoCodeFromLanguage{\TwoLetterIsoCountryCode}{\ThisDialect}%
+ \IfHasTrackedDialectModifier\ThisDialect
+ { (\GetTrackedDialectModifier\ThisDialect)}%
+ {}.
+}
+
+Language Codes:
+
+\ForEachTrackedLanguage{\ThisLanguage}{\ThisLanguage:
+ \TrackedIsoCodeFromLanguage{\TwoLetterIsoLanguageCode}{\ThisLanguage}. }
+
+\ForEachTrackedDialect{\ThisDialect}
+{%
+ \IfTrackedLanguageFileExists{\ThisDialect}{animals-}{.ldf}%
+ {Found ``animals-\CurrentTrackedTag.ldf''\par}%
+ {No file found for dialect ``\ThisDialect''\par}
+}
+
+\bye