parameters: (literalEntities, prefLanguage="en")
return_statement: return match
docstring: from a list of literals, returns the one in prefLanguage
      if no language specification is available, return first element
docstring_summary: from a list of literals, returns the one in prefLanguage
      if no language specification is available, return first element
docstring_tokens: from a list of literals returns the one in prefLanguage if no language specification is available return first element
function: def firstStringInList(literalEntities, prefLanguage="en"):
      """
      from a list of literals, returns the one in prefLanguage
      if no language specification is available, return first element
      """
      match = ""
  
      if len(literalEntities) == 1:
          match = literalEntities[0]
      elif len(literalEntities) > 1:
          for x in literalEntities:
              if getattr(x, 'language') and getattr(x,
                                                    'language') == prefLanguage:
                  match = x
          if not match:  # don't bother about language
              match = literalEntities[0]
      return match
function_tokens: def firstStringInList ( literalEntities , prefLanguage = "en" ) : match = "" if len ( literalEntities ) == 1 : match = literalEntities [ 0 ] elif len ( literalEntities ) > 1 : for x in literalEntities : if getattr ( x , 'language' ) and getattr ( x , 'language' ) == prefLanguage : match = x if not match : # don't bother about language match = literalEntities [ 0 ] return match