use SQL to convert language codes to two-letter form

using ruby takes ages and causes validation errors