Skip to content

Handle i18n slug

Allows you to retrieve the locale and the remaining slug, assuming your slug (or id) follow the [locale]/[...parts] pattern:

1
import { handleI18nSlug } from "@astrolicious/i18n/content-collections";
2
3
const { locale, slug } = handleI18nSlug(entry.slug);