name method

String name(
  1. LanguageName lang
)

Generates the name of the StemBranch in the specified lang.

Implementation

String name(LanguageName lang) {
  return switch (lang) {
    LanguageName.basic => "${stem.baseName}${branch.baseName}",
    LanguageName.basicRomany =>
      "${stem.baseNameOnRomany}-${branch.baseNameOnRomany}",
    LanguageName.vietNam => "${stem.vietnameseName} ${branch.vietnameseName}",
    LanguageName.korean =>
      "${stem.koreanNameOnHangul}${branch.koreanNameOnHangul}",
    LanguageName.koreanRomany =>
      "${stem.koreanNameOnRomany}-${branch.koreanNameOnRomany}",
    LanguageName.japaneseKunyomi =>
      "${stem.japaneseKunName}${branch.japaneseKunName}",
    LanguageName.japaneseKunyomiRomany =>
      "${stem.japaneseKunNameOnRomany} ${branch.japaneseKunNameOnRomany}",
    LanguageName.japaneseOnyomi =>
      "${stem.japaneseOnName}${branch.japaneseOnName}",
    LanguageName.japaneseOnyomiRomany =>
      "${stem.japaneseOnNameOnRomany}${branch.japaneseOnNameOnRomany}",
  };
}