\ProvidesFile{spanish-apa.lbx}[2025/08/27\space v9.20\space APA biblatex localisation]
\InheritBibliographyExtras{spanish}

\setcounter{smartand}{0} % Turn off "smart and" or ampersands will all be replaced

\NewBibliographyString{publication}
\NewBibliographyString{jourarticle}
\NewBibliographyString{revisededition}
\NewBibliographyString{chair}
\NewBibliographyString{chairs}
\NewBibliographyString{typevolume}
\NewBibliographyString{typevolumes}
\NewBibliographyString{typeseries}
\NewBibliographyString{typeseriess}
\NewBibliographyString{typevolseries}
\NewBibliographyString{typevolseriess}
\NewBibliographyString{on}
\NewBibliographyString{retrieved}
\NewBibliographyString{available}
\NewBibliographyString{from}
\NewBibliographyString{archivedat}
\NewBibliographyString{origyear}
\NewBibliographyString{reviewof}
\NewBibliographyString{with}
\NewBibliographyString{supplement}
\NewBibliographyString{commenton}
\NewBibliographyString{manunpub}
\NewBibliographyString{maninprep}
\NewBibliographyString{mansub}
\NewBibliographyString{producer}
\NewBibliographyString{producers}
\NewBibliographyString{execproducer}
\NewBibliographyString{execproducers}
\NewBibliographyString{execdirector}
\NewBibliographyString{execdirectors}
\NewBibliographyString{director}
\NewBibliographyString{directors}
\NewBibliographyString{writer}
\NewBibliographyString{writers}
\NewBibliographyString{host}
\NewBibliographyString{hosts}
\NewBibliographyString{guestexpert}
\NewBibliographyString{guestexperts}
\NewBibliographyString{narrator}
\NewBibliographyString{narrators}
\NewBibliographyString{film}
\NewBibliographyString{tvseries}
\NewBibliographyString{tvepisode}
\NewBibliographyString{video}
\NewBibliographyString{song}
\NewBibliographyString{album}
\NewBibliographyString{podcast}
\NewBibliographyString{podcastepisode}
\NewBibliographyString{interview}
\NewBibliographyString{speech}
\NewBibliographyString{lithograph}
\NewBibliographyString{map}
\NewBibliographyString{lecturenotes}
\NewBibliographyString{powerpoint}
\NewBibliographyString{photograph}
\NewBibliographyString{photographs}
\NewBibliographyString{present}
\NewBibliographyString{painting}
\NewBibliographyString{article}
\NewBibliographyString{unitednations}
\NewBibliographyString{charter}
\NewBibliographyString{ofthe}
\NewBibliographyString{tothe}

\DeclareBibliographyStrings{%
  inherit          = {spanish},
  jourarticle      = {{art\'iculo}{art\'iculo}},
%  tothe            = {{to\space the}{to\space the}},%FIXME
%  ofthe            = {{of\space the}{of\space the}},%FIXME
  unitednations    = {{Organizaci\'on\space de\space las\space Naciones\space Unidas}{ONU}},
  charter          = {{carta}{carta}},
  article          = {{art\'iculo}{art\adddot}},
  painting         = {{pintura}{pintura}},
  present          = {{presente}{presente}},
  song             = {{canci\'on}{canci\'on}},
  album            = {{\'album}{\'album}},
  map              = {{mapa}{mapa}},
  photograph       = {{fotograf\'ia}{fotograf\'ia}},
  photographs      = {{fotograf\'ias}{fotograf\'ias}},
  powerpoint       = {{diapositivas\space de\space Powerpoint}{diapositivas\space de\space Powerpoint}},
  lecturenotes     = {{apuntes}{apuntes}},
  podcast          = {{podcast\space de\space audio}{podcast\space de\space audio}},
  podcastepisode   = {{episodio\space de\space podcast\space de\space audio}{episodio\space de\space podcast\space de\space audio}},
  interview        = {{entrevista}{entrevista}},
  speech           = {{grabaci\'on\space de\space audio}{grabaci\'on\space de\space audio}},
  lithograph       = {{litograf\'ia}{litogr\adddot}},
  video            = {{v\'ideo}{v\'ideo}},
  film             = {{filme}{filme}},
  tvseries         = {{serie\space de\space televisi\'on}{serie\space de\space televisi\'on}},
  tvepisode        = {{episodio\space de\space serie\space de\space televisi\'on}{episodio\space de\space serie\space de\space televisi\'on}},
  narrator         = {{narrador}{narr\adddot}},
  narrators        = {{narradores}{narrs\adddot}},
  producer         = {{productor}{productor}},
  producers        = {{productores}{productores}},
  execproducer     = {{productor\space ejecutivo}{prod\adddot ejec\adddot}},
  execproducers    = {{productores\space ejecutivos}{prods\adddot ejec\adddot}},
  execdirector     = {{director\space ejecutivo}{dirs\adddot ejec\adddot}},
  execdirectors    = {{directores\space ejecutivos}{dirs\adddot ejec\adddot}},
  director         = {{director}{dir\adddot}},
  directors        = {{directores}{dirs\adddot}},
  writer           = {{escritor}{escritor}},
  writers          = {{escritores}{escritores}},
  host             = {{presentador}{presentador}},
  hosts            = {{presentadores}{presentadores}},
  guestexpert      = {{experto\space invitado}{experto\space invitado}},
  guestexperts     = {{expertos\space invitados}{expertos\space invitados}},
  with             = {{con}{con}},
  manunpub         = {{manuscrito\space in\'edito}{manuscrito\space in\'edito}},
  maninprep        = {{manuscrito\space en\space preparaci\'on}{manuscrito\space en\space preparaci\'on}},
  mansub           = {{manuscrito\space enviado\space para\space publicaci\'on}{manuscrito\space enviado\space para\space publicaci\'on}},
  supplement       = {{suplemento}{supl\adddot}},
  part             = {{parte}{parte}},
  january          = {{enero}{enero}},
  february         = {{febrero}{febrero}},
  march            = {{marzo}{marzo}},
  april            = {{abril}{abril}},
  may              = {{mayo}{mayo}},
  june             = {{junio}{junio}},
  july             = {{julio}{julio}},
  august           = {{agosto}{agosto}},
  september        = {{septiembre}{septiembre}},
  october          = {{octubre}{octubre}},
  november         = {{noviembre}{noviembre}},
  december         = {{diciembre}{diciembre}},
  nodate           = {{s\adddot f\adddot}{s\adddot f\adddot}},
  mathesis         = {{Tesis\addabbrvspace de\addabbrvspace maestr\'ia}{Tesis\addabbrvspace de\addabbrvspace maestr\'ia}},
  phdthesis        = {{Tesis\addabbrvspace doctoral}{Tesis\addabbrvspace doctoral}},
  revisededition   = {{Edici\'on\space revisada}{Edici\'on\space revisada}},
  commenton        = {{comentario\space sobre}{comentario\space sobre}},
  page             = {{P\'agina}{{}p\adddot}},
  pages            = {{P\'aginas}{{}pp\adddot}},
  on               = {{el}{el}},
  retrieved        = {{Consultado}{Consultado}},
  available        = {{disponible}{disponible}},
  from             = {{desde}{desde}},
  archivedat       = {{archivado\space en}{archivado\space en}},
  reviewof         = {{revisi\'on\space de}{revisi\'on\space de}},
  paragraph        = {{p\'arrafo}{p\'arr\adddot}},
  paragraphs       = {{p\'arrafos}{p\'arrs\adddot}},
  origyear         = {{Fecha\space inicial\space de\space publicaci\'on}{Fecha\space inicial\space de\space publicaci\'on}},
  chair            = {{Coordinador}{Coord\adddot}},
  chairs           = {{Coordinadores}{Coords\adddot}},
  typevolume       = {{Editor\space del\space volumen}{Ed\adddotspace vol\adddot}},
  typevolumes      = {{Editores\space del\space volumen}{Eds\adddotspace vol\adddot}},
  typeseries       = {{Editor\space de\space la\space serie}{Ed\adddotspace ser\adddot}},
  typeseriess      = {{Editores\space de\space la\space serie}{Eds\adddotspace ser\adddot}},
  typevolseries    = {{Editor\space de\space la\space serie\space y\space del\space volumen}{Ed\adddotspace vol\space\&\space ser\adddot}},
  typevolseriess   = {{Editores\space de\space la\space serie\space y\space del\space volumen}{Eds\adddotspace vol\space\&\space ser\adddot}},
  annodomini       = {{despu\'es\space de\space Cristo}{d\adddot\space C\adddot}},
  beforechrist     = {{antes\space de\space Cristo}{a\adddot\space C\adddot}},
  commonera        = {{era\space com\'un}{e\adddot c\adddot}},
  beforecommonera  = {{antes\space de\space la\space era\space com\'un}{a\adddot e\adddot c\adddot}}
  %  publication   = {{Publication}{Publication}}
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Drop end* when they are the same as *
% You must use \printdate to get here otherwise it will be ignored

\DeclareBibliographyExtras{%
  \def\urldatecomma{\addcomma\addspace}%
  \protected\def\mkbibdateapalong#1#2#3#4{%
    % As per 10.1, Articles only have year
    \ifboolexpr{ (test {\ifentrytype{article}}
                  or (test {\ifentrytype{inbook}} and not test {\ifnameundef{editor}}))
                 and not test {\iffieldequalstr{entrysubtype}{nonacademic}} }
      {\clearfield{labelmonth}%
       \clearfield{labelday}}
      {}%
    \iffieldundef{#1}% YEAR
      {}%
      {\iffieldbibstring{#1}{\bibncpstring{\thefield{#1}}}{\thefield{#1}}%
       \ifboolexpr{test {\iffieldundef{#4}} and test {\iffieldundef{#3}}}
         {}
         {\addcomma\space}}%
    \iffieldundef{#2}% YEARDIVISION
      {}%
      {\iffieldundef{#1}%
        {}%
        {\addcomma\addspace}%
       \iffieldbibstring{#2}{\bibcplstring{\thefield{#2}}}{\thefield{#2}}}%
    \iffieldundef{#4}% DAY
      {}%
      {\stripzeros{\thefield{#4}}%
       \iffieldundef{#3}
         {}
         {\addspace de\space}}%
    \iffieldundef{#3}% MONTH
      {}%
      {\mkbibmonth{\thefield{#3}}}}%
  \protected\def\mkbibdateapalongextra#1#2#3#4{%
    % As per 10.1, Articles only have year
    \ifboolexpr{ (test {\ifentrytype{article}}
                  or (test {\ifentrytype{inbook}} and not test {\ifnameundef{editor}}))
                 and not test {\iffieldequalstr{entrysubtype}{nonacademic}} }
      {\clearfield{labelmonth}%
       \clearfield{labelday}}
      {}%
    \iffieldundef{#1}% YEAR
      {}%
      {\iffieldbibstring{#1}{\bibncpstring{\thefield{#1}}}{\thefield{#1}}\printfield{extradate}%
       \ifboolexpr{test {\iffieldundef{#4}} and test {\iffieldundef{#3}}}
         {}
         {\addcomma\space}}%
    \iffieldundef{#2}% YEARDIVISION
      {}%
      {\iffieldundef{#1}%
        {}%
        {\addcomma\addspace}%
       \iffieldbibstring{#2}{\bibcplstring{\thefield{#2}}}{\thefield{#2}}}%
    \iffieldundef{#4}% DAY
      {}%
      {\stripzeros{\thefield{#4}}%
       \iffieldundef{#3}
         {}
         {\addspace de\space}}%
    \iffieldundef{#3}% MONTH
      {}%
      {\mkbibmonth{\thefield{#3}}}}%
  \protected\def\mkbibdateapalongmdy#1#2#3#4{%
    % As per 10.1, Articles only have year
    \ifboolexpr{ (test {\ifentrytype{article}}
                  or (test {\ifentrytype{inbook}} and not test {\ifnameundef{editor}}))
                 and not test {\iffieldequalstr{entrysubtype}{nonacademic}} }
      {\clearfield{labelmonth}%
       \clearfield{labelday}}
      {}%
    \iffieldundef{#2}% YEARDIVISION
      {}%
      {\iffieldundef{#1}%
        {}%
        {\addcomma\addspace}%
       \iffieldbibstring{#2}{\bibcplstring{\thefield{#2}}}{\thefield{#2}}}%
    \iffieldundef{#4}% DAY
      {}%
      {el\addspace\stripzeros{\thefield{#4}}}%
    \iffieldundef{#3}% MONTH
      {\addspace{en}\addspace}%
      {\iffieldundef{#4}%
        {en\addspace}%
        {\addspace{de}\addspace}%
       \mkbibmonth{\thefield{#3}}{\addspace{de}\addspace}}%
    \iffieldundef{#1}% YEAR
      {}%
      {\iffieldundef{#2}%
        {}%
        {\addspace}%
       \iffieldbibstring{#1}{\bibstring{\thefield{#1}}}{\thefield{#1}}}}}

\UndeclareBibliographyExtras{%
  \restorecommand\mkdaterangeapalong
  \restorecommand\mkdaterangeapalongextra
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\endinput
