-
Notifications
You must be signed in to change notification settings - Fork 36
i18n routing #701
Copy link
Copy link
Closed
Description
- Accepted Date: 2022-09-14
- Reference Issues/Discussions: i18n routing #600
- Author: @ematipico
- Champion(s): @ematipico
- Implementation PR:
Summary
First-class support for localized routes, aka i18n routing.
Background & Motivation
Many websites need to ship support for translated/localised websites for many reasons:
- legal;
- localised content;
- localised market;
- etc.
Nowadays there are workarounds in Astro to make it work, although these workarounds have limitations, and because of that many users can't ship their website properly, or they have to work more to compensate the lack of first-class support.
Goals
- Localised routes with locale prefixes;
- Default locale with no prefix;
- Redirect to default locale if prefix enabled;
- Localise injected routes;
- Domain support, with the help of Adapter features, so this will be bound to the limitations of the hosting provider;
- Provide the necessary APIs for integrations and libraries to request information about the current locales;
- Locale detection via the
Accept-Languageheader, so support SSR; - Provide first-class APIs to users to work around locales (
.astrocomponents, endpoints, middleware);
Non-Goals
- Localised data (dates, numbers, plurals, et.c);
- Dictionaries where users can store translations of pre-defined words;
- SEO optimisations;
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Implemented