We treat a position dependent quantum walk (QW) on the line which we assign two different time-evolution operators to positive and negative parts respectively. We call the model "the two-phase QW" here, which has been expected to be a mathematical model of the topological insulator. We obtain the stationary and time-averaged limit measures related to localization for the two-phase QW with one defect. This is the first result on localization for the two-phase QW. The analytical methods are mainly based on the splitted generating function of the solution for the eigenvalue problem, and the generating function of the weight of the passages of the model. In this paper, we call the methods "the splitted generating function method" and "the generating function method", respectively. The explicit expression of the stationary measure is asymmetric for the origin, and depends on the initial state and the choice of the parameters of the model. On the other hand, the time-averaged limit measure has a starting point symmetry and localization effect heavily depends on the initial state and the parameters of the model. Regardless of the strong effect of the initial state and the parameters, the time-averaged limit measure also suggests that localization can be always observed for our two-phase QW. Furthermore, our results imply that there is an interesting relation between the stationary and time-averaged limit measures when the parameters of the model have specific periodicities, which suggests that there is a possibility that we can analyze localization of the two-phase QW with one defect from the stationary measure.