Functions
@fairgarden/indicators
For lib/indicators.ts:
createIndicators— declare the locales, preferences and flags
On the object createIndicators returns, for layouts and pages:
generateStaticParams— the variants to prerender, all at once or per levelread— the locale, preferences and flags a route's params namelayoutandpage— the same, as a wrapperencodeanddecode— a segment from values, and backhref,splitLocale,negotiate— locale-aware paths, server side
Standalone, for tests and tooling:
- Helpers —
negotiateLocale,localizeHref,mountHref,indicatorsRewritesand friends
@fairgarden/indicators/withFairGardenIndicators
For next.config.ts:
withFairGardenIndicators— add the rewrites and redirectsdetectExclusions— what a look at the app keeps out of the locale rewrite
@fairgarden/indicators/link
For a client module such as lib/link.ts:
createNavigation—Link,useHref,useIndicators,useLocaleandusePref, bound to the app's config
@fairgarden/indicators/proxy
For proxy.ts:
createLocaleProxy— language negotiation at the site root