LocalizationContext
public class LocalizationContext
The LocalizationContext
contains meta information about a Spaces locales including
information about which locale is the default, and what the fallback locale chain is.
This contextual information is necessary to intiialize Entry
and Asset
instances properly so that
the correct data is displayed for the currently selected locale. For instance, if a particular field
for an Entry
does not have data for the currently selected locale, the SDK will walk the fallback
chain for this field until a non-null value is found, or full chain has been walked.
-
An ordered collection of locales representing the fallback chain.
Declaration
Swift
public let locales: [LocaleCode : Locale]
-
The default locale of the space.
Declaration
Swift
public let `default`: Locale
-
Initialize a new LocalizationContext with the relevant locales.
Declaration
Swift
public init?(locales: [Locale])