Skip to content

Instance MethodFoundationEssentials

hasCommonParent(with:)

iOS 16.0+ iPadOS 16.0+ Mac Catalyst 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
Returns a Boolean value that indicates if the given language shares a common parent with this language.
func hasCommonParent(with language: Locale.Language) -> Bool

Parameters

language

A language to compare parentage with.

Return Value

true if this language and language share a common parent; false otherwise.