% Document-language selection and the data used by shared integrations.
% Part of latexbangla, LPPL 1.3c or later; copyright 2026 Adib Hasan.

% Use written inventories: alphabetic order is not a contiguous Unicode range.
% Both languages end at ya; neither has separate uppercase labels.
% The plural suffix is shared by the two reference vocabularies.
\tl_const:Nn \c__latexbangla_reference_plural_tl {সমূহ}
\use:e {\exp_not:N\file_input:n
  {code/languages/latexbangla-\g__latexbangla_language_tl.tex}}

% Shared integrations use aliases to the selected language's immutable data.
\cs_new_eq:Nc \c__latexbangla_alphabet_clist
  {c__latexbangla_\g__latexbangla_language_tl _alphabet_clist}
\cs_new_eq:Nc \c__latexbangla_reference_names_prop
  {c__latexbangla_\g__latexbangla_language_tl _reference_names_prop}
\cs_new_eq:Nc \c__latexbangla_reference_pair_tl
  {c__latexbangla_\g__latexbangla_language_tl _reference_pair_tl}
\cs_new_eq:Nc \c__latexbangla_reference_range_tl
  {c__latexbangla_\g__latexbangla_language_tl _reference_range_tl}

% Both languages use the same Unicode digits. Select them explicitly because
% the upstream Bengali module's default numeral system is Devanagari.
\use:e
  {
    \exp_not:N \setmainlanguage
      [numerals=bengali,changecounternumbering=
        \bool_if:NTF \g__latexbangla_convert_counters_bool {true}{false}]
      {\g__latexbangla_language_tl}
  }
\endinput
