<p>To avoid the problems load <code>natbib</code> after <code>babel</code>:</p>

<pre><code>\documentclass{report}
%\documentclass[12pt,twoside]{mitthesis}


% Hebrew
\usepackage[utf8]{inputenc}
\usepackage[english,hebrew]{babel}
\usepackage[top=2cm,bottom=2cm,left=2.5cm,right=2cm]{geometry}
\usepackage{natbib}

\begin{filecontents}{bibliography.bib}
@article{example1,
  title={Title1},
  author={Author},
  journal={arXiv preprint arXiv:1706.04902},
  year={2019}
}

@article{example2,
  title={Title2},
  author={Author},
  journal={arXiv preprint arXiv:1706.04902},
  year={2019}
}
\end{filecontents}

\begin{document}
% \selectlanguage{english}
\cite{example1,example2}

{
\selectlanguage{english}
\cite{example1,example2}
}

% bibliography
% \selectlanguage{english}
\bibliography{bibliography}
\bibliographystyle{plainnat}

 \selectlanguage{english}
\bibliography{bibliography}
\bibliographystyle{plainnat}

\end{document}
</code></pre>

<p><a href="https://www.overleaf.com/read/kgrzpznmzjcz" rel="nofollow noreferrer">https://www.overleaf.com/read/kgrzpznmzjcz</a></p>
Latex using foreign language results in error in citations
<p>When including LaTeX foreign language packages:</p>

<pre><code>\usepackage[utf8x]{inputenc}
\usepackage[english,hebrew]{babel}
\usepackage[top=2cm,bottom=2cm,left=2.5cm,right=2cm]{geometry}
</code></pre>

<p>I get an error for the citations:</p>

<p>Example:</p>

<pre><code>Missing number, treated as zero.

&lt;to be read again&gt; 
                   \afterassignment 
l.19 ...{example1}}}{\@@number {27}}

A number should have been here; I inserted `0'.
(If you can't figure out why I needed to see a number,
look up `weird error' in the index to The TeXbook.)
</code></pre>

<p>Another Example:</p>

<pre><code>Improper alphabetic constant.

&lt;to be read again&gt; 
                   \afterassignment 
l.86 ...15normalized}. \citet{example2}
                                                   further improved the resu...
A one-character control sequence belongs after a ` mark.
So I'm essentially inserting \0 here.

! Missing = inserted for \ifnum.
&lt;to be read again&gt; 
                   \afterassignment 
l.86 ...15normalized}. \citet{example2}
                                                   further improved the resu...
I was expecting to see `&lt;', `=', or `&gt;'. Didn't.
</code></pre>

<p>And the citations are empty.
When I don't include the foreign language packages I don't get the error and the citations are great. </p>

<p>The format I used for citations is \usepackage{natbib} and for the document \documentclass[12pt,twoside]{mitthesis}.</p>

<p>I also tried other formats and get the same error. </p>

<p>bibliography.bib is traditional:</p>

<pre><code>@article{example1,
  title={Title1},
  author={Author},
  journal={arXiv preprint arXiv:1706.04902},
  year={2019}
}

@article{example2,
  title={Title2},
  author={Author},
  journal={arXiv preprint arXiv:1706.04902},
  year={2019}
}
</code></pre>

<p>Minimal Working Example is super basic, (the minimal Not-Working Example is when you uncomment the Hebrew part):</p>

<pre><code>\documentclass{report}
%\documentclass[12pt,twoside]{mitthesis}
\usepackage{natbib}

% Hebrew
% \usepackage[utf8x]{inputenc}
% \usepackage[english,hebrew]{babel}
% \usepackage[top=2cm,bottom=2cm,left=2.5cm,right=2cm]{geometry}

\begin{document}
%\selectlanguage{english}
\include{introduction} %some text with \cite{example1} and so on...


% bibliography
\bibliography{bibliography}
\bibliographystyle{plainnat}

\end{document}
</code></pre>