Documentation
¶
Index ¶
- func CollectLocaleCodes(ctx context.Context, ids []uuid.UUID, directCodes []string, ...) []string
- func DedupeLocalePreference(primaryID uuid.UUID, primaryCode string, fallbackID uuid.UUID, ...) (uuid.UUID, string, uuid.UUID, string)
- func LocaleCodeByID(ctx context.Context, id uuid.UUID, ...) string
- func MissingRequestedLocale(requested string, available []string) bool
- func NormalizeLocale(code string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectLocaleCodes ¶
func CollectLocaleCodes(ctx context.Context, ids []uuid.UUID, directCodes []string, resolver func(context.Context, uuid.UUID) (string, error)) []string
CollectLocaleCodes normalizes, deduplicates, and preserves locale order.
func DedupeLocalePreference ¶
func DedupeLocalePreference(primaryID uuid.UUID, primaryCode string, fallbackID uuid.UUID, fallbackCode string) (uuid.UUID, string, uuid.UUID, string)
DedupeLocalePreference clears the fallback when it matches the primary locale.
func LocaleCodeByID ¶
func LocaleCodeByID(ctx context.Context, id uuid.UUID, resolver func(context.Context, uuid.UUID) (string, error)) string
LocaleCodeByID resolves a locale code lazily using the supplied callback.
func MissingRequestedLocale ¶
MissingRequestedLocale reports whether a requested locale is absent from the available set.
func NormalizeLocale ¶
NormalizeLocale trims and canonicalizes locale codes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.