def short_language_code(code=None):
 if (code is None):
  code = translation.get_language()
 pos = code.find(u'-')
 if (pos > (-1)):
  return code[:pos]
 return code

def short_language_code ( code = None ) : if ( code is None ) : code = translation . get_language ( ) pos = code . find ( u'-' ) if ( pos > ( - 1 ) ) : return code [ : pos ] return code
extract the short language code from its argument .