getLanguageCode method

String getLanguageCode([
  1. Language? model
])

Implementation

String getLanguageCode([Language? model]) {
  model ??= getCurrentLanguage();
  if (model.languageCode == 'zh') {
    return 'zh-cn';
  } else if (model.languageCode == 'tc') {
    return 'zh-tw';
  }
  return model.languageCode;
}