Contents

identifier(_:from:)

Returns the identifier conforming to the specified standard for the specified string.

Declaration

static func identifier(_ type: Locale.IdentifierType, from string: String) -> String

Parameters

  • type:

    The identifier type used by string, such as Icu or Bcp47.

  • string:

    An identifier string that complies with the standard indicated by type.

Return Value

A locale identifier.

See Also

Converting between identifiers