To place the current label before the bipole component, the current direction specifier (>
or <
) must appear before the label location specifier (^
or _
). Since you haven't specified the current direction here, the default direction (with the direction the component is drawn) and ordering (current after component, in the direction of drawing) is assumed.
See my answer at Electrical diagram for a complete description of current labeling specifications.
Note that using \mbox
around the label text is only necessary when the label contains an equals sign.
In this case, use i>^=$i_{r}$
to place the current as desired (>
to draw the current in the same direction that the bipole is drawn, ^
to place the label "above" the bipole [where "above" assumes the component is drawn from left to right], and in that order so that the current label is placed before the bipole component symbol.
\documentclass{standalone}
\usepackage{circuitikz}
\begin{document}
\begin{circuitikz} \draw
(0,0) to[american current source, label=$I_{f}$] (0,4) -- (6,4)
(2,4) to[opening switch, label=\mbox{$t=0$}] (2,0)
(4,4) to[R, l_=R, i>^=$i_{r}$] (4,0)
(6,4) to[C] (6,0)
(6,0) -- (0,0)
;
\end{circuitikz}
\end{document}

2
so you have\draw (4,4) to[generic,i>^=$i_1$] +(0,2);