getLocalizedString method

String getLocalizedString(
  1. SDNLocalizations i18n
)

Implementation

String getLocalizedString(SDNLocalizations i18n) {
  switch (this) {
    case JoinRules.public:
      return i18n.anyoneCanJoin;
    case JoinRules.invite:
      return i18n.invitedUsersOnly;
    default:
      return toString().replaceAll('JoinRules.', '');
  }
}