Skip to content

Language negotiation for service and collection metadata - #214

Open
jampukka wants to merge 1 commit into
nlsfi:mainfrom
jampukka:html-197-squashed
Open

Language negotiation for service and collection metadata#214
jampukka wants to merge 1 commit into
nlsfi:mainfrom
jampukka:html-197-squashed

Conversation

@jampukka

@jampukka jampukka commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Should solve #197

  • Catalog (concept, not a class)
    • A per-language .properties file declared with locale.<lang>.path, holding
      only the keys that differ from the base config
    • Localization gets its values from here, falling back to the base config
      per key, so a catalog can be arbitrarily sparse and a declared language
      needs no catalog at all
    • LocalizableKeys describes the allowed keys a catalog file can override, extraneous keys will throw an exception
  • Localization
    • Holds all localized values from catalogs, constructed at startup time as part of configuration parsing.
    • Localized value resolution is per key (catalog > base config > null), which is what makes sparse catalogs work.
  • LangNegotiation
    • Contains logic for language negotiation with ?lang= and Accept-Language
  • LocalizableKeys
    • Controls which properties are localizable (via configuration)
  • LocalizedFeatureServiceConfig / LocalizedFeatureType
    • Wraps the Config/FeatureType, translates title/description (via Localization), delegates every other method to wrapped Config/FeatureType.

@jampukka jampukka added this to the 2.1.0 milestone Aug 28, 2026
@teezip

teezip commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Thanks! Suggested configuration model, negotiation implementation and localization of descriptive elements seems to be fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants