diff --git a/Sources/Locale.swift b/Sources/Locale.swift index 78d0aee2..99479c4e 100644 --- a/Sources/Locale.swift +++ b/Sources/Locale.swift @@ -41,7 +41,16 @@ public class Locale: ImmutableMappable { } } -internal class LocalizationContext: MapContext { +/** + The `LocalizationContext` contains meta information about a Space about 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. + */ +public class LocalizationContext: MapContext { // An ordered collection of locales representing the fallback chain. internal let locales: [LocaleCode: Locale] diff --git a/Sources/Space.swift b/Sources/Space.swift index 0cc9bac5..6f18fd47 100644 --- a/Sources/Space.swift +++ b/Sources/Space.swift @@ -24,7 +24,8 @@ public class Space: Resource { return sys.type } - internal let localizationContext: LocalizationContext + /// Context for holding information about the fallback chain of locales for the Space. + public let localizationContext: LocalizationContext // MARK: