@astrolicious/i18n
Version:
Yet another i18n integration for Astro with server and client utilities, type safety and translations built-in.
47 lines (44 loc) • 1.32 kB
TypeScript
import * as astro from 'astro';
import { RouteData, InjectedRoute } from 'astro';
import * as sitemap from 'sitemap';
import { Route as Route$1 } from '../types.js';
import { CallbackSchema } from './route-config.js';
import '../options.js';
import 'astro/zod';
type _RouteRoute = Omit<Route$1, "injectedRoute"> & {
injectedRoute: Omit<InjectedRoute, "prerender"> & {
prerender?: boolean | undefined;
};
};
type Route = {
pages: Array<string>;
route: _RouteRoute | undefined;
routeData: RouteData;
sitemapOptions: Array<Exclude<CallbackSchema, false>>;
include: boolean;
};
declare const integration: (options: {
customPages?: string[] | undefined;
entryLimit?: number | undefined;
changefreq?: sitemap.EnumChangefreq | undefined;
lastmod?: Date | undefined;
priority?: number | undefined;
} & {
internal: {
i18n: {
defaultLocale: string;
locales: string[];
};
routes: {
params: string[];
locale: string;
pattern: string;
injectedRoute: {
pattern: string;
entrypoint: string;
prerender?: boolean | undefined;
};
}[];
};
}) => astro.AstroIntegration & {};
export { type Route, integration };