Skip to content

i18n routing #701

@ematipico

Description

@ematipico

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-Language header, so support SSR;
  • Provide first-class APIs to users to work around locales (.astro components, endpoints, middleware);

Non-Goals

  • Localised data (dates, numbers, plurals, et.c);
  • Dictionaries where users can store translations of pre-defined words;
  • SEO optimisations;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Implemented

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions