WikipediaLanguage

public struct WikipediaLanguage

A struct used to transform Locale language codes into the different localized Wikipedia subdomains.

  • Initializes a new WikipediaLanguage that determines the desired subdomain using from Locale object. Falls back to ‘en’ when the language code cannot be determined.

    Note

    The idea of having this type is being able to override any non matching code transformations between the iOS locale and the Wikipedia subdomain.

    Declaration

    Swift

    public init(locale: Locale = Locale.current)

    Parameters

    locale

    The desired language code. Defaults to user’s.