def export_languages_json():
 languages = frappe.db.get_all(u'Language', fields=[u'name', u'language_name'])
 languages = [{u'name': d.language_name, u'code': d.name} for d in languages]
 languages.sort((lambda a, b: (1 if (a[u'code'] > b[u'code']) else (-1))))
 with open(frappe.get_app_path(u'frappe', u'geo', u'languages.json'), u'w') as f:
  f.write(frappe.as_json(languages))

def export_languages_json ( ) : languages = frappe . db . get_all ( u'Language' , fields = [ u'name' , u'language_name' ] ) languages = [ { u'name' : d . language_name , u'code' : d . name } for d in languages ] languages . sort ( ( lambda a , b : ( 1 if ( a [ u'code' ] > b [ u'code' ] ) else ( - 1 ) ) ) ) with open ( frappe . get_app_path ( u'frappe' , u'geo' , u'languages.json' ) , u'w' ) as f : f . write ( frappe . as_json ( languages ) )
export list of all languages .