Add i18n support with next-intl for 17 locales#36
Open
Conversation
❌ Deploy Preview for casbin-website-v3 failed.
|
|
|
Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
Co-authored-by: nomeguy <85475922+nomeguy@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for i18n in Fumadocs site
Add i18n support with next-intl for 17 locales
Feb 1, 2026
7b20304 to
70d3373
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements internationalization to enable reuse of existing Crowdin project translations from the v2 Docusaurus site.
Content Structure
Migrated flat content structure to locale-scoped directories:
Currently populated:
en/(source locale). Other 16 locale directories created empty, ready for Crowdin translations.Routing
[locale]dynamic segment/en/docs/get-started,/zh/docs/get-started, etc.Fumadocs Integration
Custom locale-aware loaders in
src/lib/source.ts:Slug generation strips locale folder to maintain flat URLs.
Configuration
messages/{locale}.jsonfor UI strings (en, zh translated; others placeholders)src/middleware.tswith matcher excluding static assetsi18n.ts,src/i18n/routing.tsCrowdin Ready
Content structure mirrors v2 for direct translation import. English content serves as source.
See
docs/I18N_SETUP.mdfor locale addition workflow.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
fonts.googleapis.com/usr/local/bin/node node /home/REDACTED/work/casbin-website-v3/casbin-website-v3/node_modules/.bin/next build sh -c del/super-admin.mdx"(dns block)/usr/local/bin/node node /home/REDACTED/work/casbin-website-v3/casbin-website-v3/node_modules/.bin/next build sh px ntent/docs/en/model/rbac/rbac-with-pattern.mdx" -last-updated.ts ndor/bin/sh rd copilot/add-i18n-c nfig/composer/venpx tsx scripts/generate-last-updated.ts /bin/sh d/po�� mat=%cd --date=iso-strict -- "content/docs/en/model/effector.mdx" git node_modules/@npmcli/run-script/lib/node-gyp-bin/node get(dns block)/usr/local/bin/node node /home/REDACTED/work/casbin-website-v3/casbin-website-v3/node_modules/.bin/next build /bin/sh es/.�� git log -1 --format=%cd --date=iso-strict -- "content/docs/en/inINVALID,NEW sh es/.bin/sh node scripts/buish dated bin/node sh -c d.ts bash /usr/local/sbin/sh --noprofile(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.