def month_by_name(name, lang=u'en'):
 month_names = MONTH_NAMES.get(lang, MONTH_NAMES[u'en'])
 try:
  return (month_names.index(name) + 1)
 except ValueError:
  return None

def month_by_name ( name , lang = u'en' ) : month_names = MONTH_NAMES . get ( lang , MONTH_NAMES [ u'en' ] ) try : return ( month_names . index ( name ) + 1 ) except ValueError : return None
return the number of a month by english name .