[latex3-commits] [git/LaTeX3-latex3-latex2e] gh1035: Provide en-US as the default locale (ca8bd1f4)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Apr 16 20:39:57 CEST 2023


Repository : https://github.com/latex3/latex2e
On branch  : gh1035
Link       : https://github.com/latex3/latex2e/commit/ca8bd1f42a28dc20780667b6517d4916c752d8c3

>---------------------------------------------------------------

commit ca8bd1f42a28dc20780667b6517d4916c752d8c3
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Apr 16 19:39:57 2023 +0100

    Provide en-US as the default locale


>---------------------------------------------------------------

ca8bd1f42a28dc20780667b6517d4916c752d8c3
 base/doc/clsguide.tex | 18 +++++++++---------
 base/ltfinal.dtx      | 16 +++++++++++++---
 2 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/base/doc/clsguide.tex b/base/doc/clsguide.tex
index c34f8c81..04183189 100644
--- a/base/doc/clsguide.tex
+++ b/base/doc/clsguide.tex
@@ -1141,15 +1141,15 @@ in a class file then automatic default setting will be over-ridden.
 \subsection{Querying localisation}
 
 Localisation information is needed to customise a range of outputs. The
-\LaTeX{} kernel does not itself manage localisation, which is well-served
-by the bundles \pkg{babel} and \pkg{polyglossia}. To allow the kernel and
-other packages to access the current localisation information provided
-by \pkg{babel} or \pkg{polyglossia}, the command \cs{BCPdata} is defined
-by the kernel. The initial kernel definition absorbs one argument and
-expands to an empty value, as the kernel does not track localisation.
-However, if \pkg{babel} or \pkg{polyglossia} are loaded, it is redefined
-to takes one argument and expand to the BCP-47 information matching this
-argument. The supported arguments are the BCP-47 tag breakdowns:
+\LaTeX{} kernel does not itself manage localisation, which is well-served by
+the bundles \pkg{babel} and \pkg{polyglossia}. To allow the kernel and other
+packages to access the current localisation information provided by \pkg{babel}
+or \pkg{polyglossia}, the command \cs{BCPdata} is defined by the kernel. The
+initial kernel definition expands to tag parts for \texttt{en-US}, as the
+kernel does not track localisation but does start out with a broadly US~English
+setup. However, if \pkg{babel} or \pkg{polyglossia} are loaded, it is redefined
+expand to the BCP-47 information from the appropriate package. The supported
+arguments are the BCP-47 tag breakdowns:
 \begin{itemize}
   \item \texttt{language} (e.g.,~\texttt{de})
   \item \texttt{region} (e.g.,~\texttt{AT})
diff --git a/base/ltfinal.dtx b/base/ltfinal.dtx
index bf78eb38..1c41a918 100644
--- a/base/ltfinal.dtx
+++ b/base/ltfinal.dtx
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfinal.dtx}
-             [2023/04/11 v2.3a LaTeX Kernel (Final Settings)]
+             [2023/04/16 v2.3a LaTeX Kernel (Final Settings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfinal.dtx}
@@ -1063,10 +1063,20 @@
 %    \end{macrocode}
 %
 % \begin{macro}{\BCPdata}
-% \changes{v2.3a}{2023/04/11}{Command added}
+% \changes{v2.3a}{2023/04/16}{Command added}
 %   A stub for use by \pkg{babel}, \pkg{polyglossia}, etc.
 %    \begin{macrocode}
-\newcommand*\BCPdata[1]{}
+\ExplSyntaxOn
+\newcommand*\BCPdata[1]{
+  \str_case:nnF {#1}
+    {
+      { language } { en }
+      { region }   { US }
+      { casing }   { }
+    }
+    { en-US }
+}
+\ExplSyntaxOff
 %    \end{macrocode}
 % \end{macro}
 %





More information about the latex3-commits mailing list.