import type { SiteConfig, SiteI18nOptions } from './types';
export type { SiteI18nOptions };
/**
 * Resolve i18n config into the runtime shape used by the build.
 *
 * Translations are merged from two sources, in priority order:
 *   1. `i18n.translations[<locale>]` — inline strings from `site.config.ts`
 *   2. `<translationsDir>/<locale>.<format>` on disk — JSON or YAML files
 *
 * Inline strings win on key conflicts, so config-level overrides don't
 * require editing the shared translation files. Missing locales/files
 * are silently tolerated; the file loader returns `{}` for anything it
 * can't read so the default locale's table can still serve as a
 * fallback at translate-time.
 */
export declare function resolveI18n(site: SiteConfig, projectRoot?: string): ResolvedI18n | null;
/**
 * Translate a key for a locale, falling back to the default locale's
 * value, then to the key itself. The fallback chain keeps prototypes
 * shippable even when only a subset of strings is translated.
 */
export declare function translate(i18n: ResolvedI18n, locale: string, key: string): string;
/**
 * Replace `{t:key}` and `{t!:key}` markers in HTML with the translated
 * string for the given locale. The key syntax sidesteps stx's
 * `{{ ... }}` templating (which evaluates as JS at build time and
 * would render `t(...)` calls as empty when no `t` binding exists
 * in scope).
 *
 * Two variants:
 *   - `{t:key}`  — value is HTML-escaped before substitution. Default
 *     for ordinary text. Safe for any translator-supplied string.
 *   - `{t!:key}` — value is substituted *raw*, without escaping. Use
 *     this when the translation needs inline markup (e.g. `<strong>`,
 *     `<a>`, `<br>`) so different languages can place emphasis where
 *     their grammar requires. Translation values for these keys live
 *     in the project's own translation files, so the trust boundary
 *     is the same as the page template itself.
 *
 * Keys may use letters, digits, `_`, `.`, `-`. Anything that doesn't
 * match the pattern is left alone — runs after stx has finished its
 * own templating pass.
 */
export declare function applyTranslations(html: string, i18n: ResolvedI18n, locale: string): string;
/**
 * URL path for a built page in the given locale.
 *
 * - `/` stays `/` for the default locale; for non-default locales it
 *   becomes `/<code>/` (with the trailing slash). The slash matters
 *   because most static hosts (S3+CloudFront, GitHub Pages, etc.)
 *   only serve the directory's `index.html` when the URL ends in `/`
 *   — `/de` 404s, `/de/` resolves. Linking with the slash avoids a
 *   client-side redirect dance and lets SPA hops succeed without
 *   falling back to a full page load.
 * - `/about` becomes `/<code>/about` for non-default locales (no
 *   trailing slash — those map to `<code>/about.html`).
 * - `/404.html` keeps its filename and lives under the locale prefix.
 */
export declare function localizePath(path: string, locale: string, defaultLocale: string): string;
/**
 * Reverse of `localizePath`: strip a locale prefix off a path so we
 * can compute the equivalent path in another locale.
 */
export declare function stripLocalePrefix(path: string, locales: string[]): { locale: string | null, path: string };
/**
 * `<link rel="alternate" hreflang>` block + `<link rel="canonical">`
 * for the page being rendered. Search engines treat each as the
 * authoritative copy for its locale.
 */
export declare function buildAlternateLinks(siteUrl: string, pagePath: string, i18n: ResolvedI18n): string;
/**
 * Inline script that wires up the language picker.
 *
 * Per-page logic: each `<button data-lang="…">` inside the configured
 * picker selector navigates to the equivalent path in the chosen
 * locale, using the locale list shipped in `window.__stxI18n`. Marks
 * the active button with `aria-current="true"` for styling.
 */
export declare function buildLangPickerScript(i18n: ResolvedI18n, currentLocale: string): string;
export declare interface ResolvedI18n {
  locales: string[]
  defaultLocale: string
  labels: Record<string, string>
  translations: Record<string, Record<string, string>>
  pickerSelector: string
}
