Skip to content

Commit b5e4589

Browse files
committed
Add internationalization to documents
1 parent bfc1b22 commit b5e4589

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+1782
-216
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212
},
1313
plugins: ["@typescript-eslint", "prettier"],
1414
rules: {
15+
"no-unused-expressions": "off",
1516
"prettier/prettier": [2],
1617
},
1718
}

astro-i18next.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @type {import('astro-i18next').AstroI18nextConfig} */
2+
export default {
3+
defaultLocale: "en",
4+
locales: ["en", "zh"],
5+
}

astro.config.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { defineConfig } from "astro/config"
22
import preact from "@astrojs/preact"
33
import react from "@astrojs/react"
4+
import astroI18next from "astro-i18next"
45
import { astroCallouts } from "./integrations/astro-callouts"
56
import { solidityRemixCode } from "./integrations/solidity-remix"
67
import { youtubeEmbed } from "./integrations/youtube-embed"
@@ -39,6 +40,7 @@ export default defineConfig({
3940
// Useful if you need to define and/or import your own custom `base.css`.
4041
config: { applyBaseStyles: false },
4142
}),
43+
astroI18next(),
4244
],
4345
markdown: {
4446
drafts: true,

0 commit comments

Comments
 (0)