Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare field to receive i18n contributions #173

Closed
wants to merge 4 commits into from

Conversation

guilherssousa
Copy link

@guilherssousa guilherssousa commented Jun 22, 2022

Propose

As mentioned by @kwonoj on Issue #172 and by @kdy1 on #158, there is no near future plan to receive doc translations in official branch. So, this pull request does not add any translations to docs but instead prepares the field by implementing Nextra's Next.js i18n Routing feature and changing the current file structure to fit the given locale approach.

Important Changes

  • In next.config.js, i18n settings are added, by defining en-US as default locale.
  • All documentation markdown files and meta JSON files (except for Playground)* were added a .en-US right before their file extensions.
    • *Since Playground only renders an Iframe displaying play.src.rs, they are ignored on middleware level to avoid errors.

@CLAassistant
Copy link

CLAassistant commented Jun 22, 2022

CLA assistant check
All committers have signed the CLA.

@vercel
Copy link

vercel bot commented Jun 22, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
website ✅ Ready (Inspect) Visit Preview Jun 22, 2022 at 4:39PM (UTC)

@@ -0,0 +1,13 @@
import { NextResponse } from "next/server";
import { locales } from "nextra/locales";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you don't use

import { withLocales } from 'nextra/locales'

@@ -6,6 +6,10 @@ const withNextra = require("nextra")({
});

module.exports = withNextra({
i18n: {
locales: ["en-US"],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create i18n config file to use here and on theme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants