Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.15 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.15 KB

astro-react-uswds-starter

This is an example Astro project using Typescript, React, and SASS.

The UI is built with CSS and Javascript from USWDS (US Web Design System).

Getting started

Install dependencies:

npm install

Run the astro dev server:

npm run start

Build the static site:

npm run build

Internationalization (i18n)

This project relies on astro-i18n-aut to generate the routes for all of the configured languages in astro.config.mjs. For example, with English and Spanish configured, it will take pages/subpage/index.astro and generate both /subpage/index.html and /es/subpage/index.html.

Within each pages/*.astro file, astro-i18n-aut will tell us which locale is currently active, and our i18next integration handles finding and rendering the translated strings. Does this make sense? I hope so.

In v4.0, Astro added built-in support for i18n routing.

Astro’s Internationalization Guide