convertLanguageIso static method
Converts a language ISO code between ISO-2 and ISO-3 formats.
Converts the provided language code to the requested type. The
method supports common language code conversions (for example hu <->
hun).
Parameters
code: The language ISO code to convert. Can be ISO-2 or ISO-3.type: The target ISOCodeType for the converted code.
Returns
- A String containing the converted language ISO code.
Also see:
- convertCountryIso - for converting country ISO codes.
Implementation
static String convertLanguageIso(String code, ISOCodeType type) {
final OperationResult resultString = staticMethod(
'ISOCodeConversions',
'convertLanguageIso',
args: <String, dynamic>{'code': code, 'type': type.id},
);
final String result = resultString['result'];
return result;
}