def transform_language_code(code):
if code is None:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>components = code.split('<STR_LIT:->', <NUM_LIT:2>)<EOL>language_code = components[<NUM_LIT:0>]<EOL>try:<EOL><INDENT>country_code = components[<NUM_LIT:1>]<EOL><DEDENT>except IndexError:<EOL><INDENT>country_code = '<STR_LIT:_>'<EOL><DEDENT>language_family = SUCCESSFACTORS_OCN_LANGUAGE_CODES.get(language_code)<EOL>if not language_family:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>return language_family.get(country_code, language_family['<STR_LIT:_>'])<EOL>
Transform ISO language code (e.g. en-us) to the language name expected by SAPSF.