def encode_language(name):
 for (tag, (language, region, iso639, iso3166)) in LANGUAGE_REGION.items():
  if (language == name.capitalize()):
   return iso639

def encode_language ( name ) : for ( tag , ( language , region , iso639 , iso3166 ) ) in LANGUAGE_REGION . items ( ) : if ( language == name . capitalize ( ) ) : return iso639
returns the language code for the given language name .