astro-loader-i18n
Version:
An Astro content loader for i18n files and folder structures.
15 lines (14 loc) • 740 B
TypeScript
import { glob, Loader } from 'astro/loaders';
type GlobOptions = Parameters<typeof glob>[0];
/**
* A loader function for handling internationalization (i18n) content in an Astro project.
* This loader processes files matching the specified glob pattern, associates them with locales,
* and augments their data with i18n-specific metadata such as locale, translation ID, and content path.
*
* @param options - Configuration options for the glob pattern to match files.
* @returns A loader object with a custom `load` method for processing i18n content.
*
* @throws Will throw an error if the `i18n` configuration is missing in the Astro config.
*/
export declare function i18nContentLoader(options: GlobOptions): Loader;
export {};