[Tex/LaTex] BibTeX: replace the “Available:” before URL in citations and references with its equivalent in spanish, i.e: Disponible

bibliographiesbibtexspanish

I'm having trouble with how URLs are displayed in the bibliography section. The document is in Spanish, but instead of displaying "Disponible en:" before the address appears the word "Available:". As can configure this, without resort to manually modify the .bst file.

%-- Document Class
\documentclass[10pt]{article}
%-- Packages
\usepackage[a4paper, top=2.5cm, bottom=2.5cm, left=2.2cm, right=2.2cm]{geometry}
\usepackage[spanish,es-tabla]{babel}
\usepackage[noadjust]{cite}
%-- Document Fragment
\begin{document} 
     .
     .
     .
\section{Objetivos} 
 El Laboratorio de ....\cite{Momoh2012,Berger2012}.
     .
     .
\bibliographystyle{IEEEtran} 
\bibliography{myBIB}      
\end{document}

bibliography outcome

Best Answer

You asked,

[How] can [I] configure this, without resort to manually modify[ing] the .bst file?

The IEEEtran bibliography style does provide some switches and macros that can be redefined "on the fly" from within your TeX document and/or the bib file(s). To achieve your objective, though, it turns out to be more straightforward (in my opinion) to modify the bst file directly. Fortunately, the required edits to the bst file aren't difficult to undertake, in no small part because the language-related functions are defined near the top of the style file.

  • Find the file IEEEtran.bst in your TeX distribution. If you use TeXLive on a unix or MacOSX system, the file might be at /usr/local/texlive/2014/texmf-dist/bibtex/bst/IEEEtran/IEEEtran.bst. Make a copy of this file and call the copy, say, IEEEtran-spanish.bst. (Don't edit an original file of the TeX distribution directly.)

  • Open the file IEEEtran-spanish.bst in a TeX-aware editor and search for the line that reads

    FUNCTION {default.name.url.prefix}{ "[Online]. Available:" }
    

    In my copy of this file, it's on line 179. Change the instruction to

    FUNCTION {default.name.url.prefix}{ "[Online]. Disponible en:" }
    

    I'm afraid I don't know enough Spanish to give a suggestion on how to translate "Online".

  • While you're at it, you may also want to modify some of the string constant functions that start on line 232 of the file. E.g., you may want to change the line

    FUNCTION {bbl.and}{ "and" }
    

    to

    FUNCTION {bbl.and}{ "y" }
    
  • Similarly, you may want to change the macros, starting on line 277, that set up the abbreviations for months.

  • Save the file IEEEtran-spanish.bst. Store it either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter method, be sure to update the filename database of your TeX distribution suitably.

  • Start using the new bibliography style by issuing the command

    \bibliographystyle{IEEEtran-spanish}
    

    Be sure to run LaTeX, BibTeX, and LaTeX twice more to fully propagate the changes.