Get language getting from the field attribute rather than name.

The method seems to be not used anymore, but fix it nevertheless.