Contents

supportsLocale(_:)

Returns a Boolean value that indicates whether the given locale is supported by the model.

Declaration

nonisolated(nonsending) final func supportsLocale(_ locale: Locale = Locale.current) async throws -> Bool

Discussion

Use this method over supportedLanguages to check whether the given locale qualifies a person for using this model, as this method also takes language fallbacks into consideration.

See Also

Handling language and locales