if @lang.code
returning the en-IN
, it means its giving you .defaultLang
in place of .code
, may be you are using a variable of lang
name also in your controller.and you confused the play so it is taking .defaultLang
, which is returning en-IN
.
make sure no variable name should be lang and the problem will be solved.