SCPLocalizationResult

Objective-C


@interface SCPLocalizationResult : NSObject <NSCopying>

Swift

class LocalizationResult : NSObject, NSCopying

Reports the outcome of localizing an SCPApiError.message.

  • requestedLocale reflects the locale the SDK sent in the Accept-Language request header.
  • resolvedLocale reflects the locale the message was localized to, taken from the Content-Language response header (defaults to en-US if the header is absent).

The two may differ when the requested locale is not supported — in that case, the server falls back to en-US.

  • The locale sent in the Accept-Language request header.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull requestedLocale;

    Swift

    var requestedLocale: String { get }
  • The locale the message was localized to.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull resolvedLocale;

    Swift

    var resolvedLocale: String { get }
  • Unavailable

    Unavailable. SCPLocalizationResult is created internally by the SDK.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Unavailable

    Unavailable. SCPLocalizationResult is created internally by the SDK.

    Declaration

    Objective-C

    + (nonnull instancetype)new;