TextWithPhonetics

public struct TextWithPhonetics : Equatable

Represents a localized string with optional phonetics information.

Lifecycle

  • Creates an instance with the specified parameters.

    Throws

    An error of the type InitializationError.

    Declaration

    Swift

    public init(
        plainText: String,
        plainTextLanguage: Locale,
        phoneticString: PhoneticString? = nil
    ) throws

    Parameters

    plainText

    Plain text value.

    plainTextLanguage

    Locale for the plain text value.

    phoneticString

    Phonetic string, if available.

Public

  • Plan text value.

    Declaration

    Swift

    public let plainText: String
  • Locale for the plain text value.

    Declaration

    Swift

    public let plainTextLanguage: Locale
  • Phonetic string, if available.

    Declaration

    Swift

    public let phoneticString: PhoneticString?

TextWithPhonetics.InitializationError