diff --git a/blog/en-US/gt-next.mdx b/blog/en-US/gt-next.mdx index 4f30479e..eeaa8ea9 100644 --- a/blog/en-US/gt-next.mdx +++ b/blog/en-US/gt-next.mdx @@ -8,7 +8,7 @@ tags: ['guide', 'internationalization', 'nextjs', 'gt-next'] **Internationalization (i18n) sucks. We're building a Next.js library, gt-next, to make it easier.** Today we're launching it in open beta. -``` copy +```bash copy npm i gt-next ``` diff --git a/blog/en-US/multilingual-nextjs-seo.mdx b/blog/en-US/multilingual-nextjs-seo.mdx index b019428a..1ac2d899 100644 --- a/blog/en-US/multilingual-nextjs-seo.mdx +++ b/blog/en-US/multilingual-nextjs-seo.mdx @@ -33,7 +33,7 @@ Search engines need separate, crawlable URLs to index each language version inde This means **locale-in-the-URL** — not cookies, not query parameters, not `Accept-Language` detection alone. -``` +```text ✅ generaltranslation.com/en/about ✅ generaltranslation.com/fr/about ✅ generaltranslation.com/es/about @@ -46,7 +46,7 @@ This means **locale-in-the-URL** — not cookies, not query parameters, not `Acc First, nest your pages under a `[locale]` dynamic segment: -``` +```text app/ └── [locale]/ ├── layout.tsx diff --git a/blog/en-US/plurals.mdx b/blog/en-US/plurals.mdx index 02b1af42..3f92952b 100644 --- a/blog/en-US/plurals.mdx +++ b/blog/en-US/plurals.mdx @@ -12,7 +12,7 @@ layout: PostLayout We often encounter apps that display awkward messages like: -``` +```text You have 1 new message(s) ``` @@ -87,7 +87,7 @@ pluralize(2, 'child', 'children') // "children" But what if you need more complicated logic, like: -``` +```text "No one is watching" "1 person is watching" "2 people are watching" @@ -168,7 +168,7 @@ languages like Arabic and Polish have more than just these two forms. For example, an English-speaking user might expect: -``` +```text "No one is watching" "1 person is watching" "2 people are watching" @@ -177,7 +177,7 @@ For example, an English-speaking user might expect: Whereas an Arabic-speaking user might expect different expressions for singular, dual (when the count is exactly two things), and small and large plural forms: -``` +```text "لا أحد يشاهد" "1 شخص يشاهد" "2 شخصان يشاهدان" diff --git a/devlog/en-US/gt-next_v6_3_0.mdx b/devlog/en-US/gt-next_v6_3_0.mdx index ce7567e9..9ea11079 100644 --- a/devlog/en-US/gt-next_v6_3_0.mdx +++ b/devlog/en-US/gt-next_v6_3_0.mdx @@ -63,7 +63,7 @@ export default function Page() { To support interpolation, the `msg()` function returns an encoded message instead of a plain string. The format looks like this: -``` +```text : ``` diff --git a/devlog/en-US/gt-react_v10_18_0.mdx b/devlog/en-US/gt-react_v10_18_0.mdx index 397ef4ab..7fde2e46 100644 --- a/devlog/en-US/gt-react_v10_18_0.mdx +++ b/devlog/en-US/gt-react_v10_18_0.mdx @@ -94,7 +94,7 @@ function StatusMessage({ isMasculine }) { At build time, the CLI sees the `derive()` call and registers two separate source entries, each producing its own translation: -``` +```text "I am tired" ($context: "inflect as masculine") → "Estoy cansado" "I am tired" ($context: "inflect as feminine") → "Estoy cansada" ``` diff --git a/docs/en-US/next/api/config/with-gt-config.mdx b/docs/en-US/next/api/config/with-gt-config.mdx index 16ed49f0..0f79e450 100644 --- a/docs/en-US/next/api/config/with-gt-config.mdx +++ b/docs/en-US/next/api/config/with-gt-config.mdx @@ -262,7 +262,7 @@ If the translation is cached, response time is too low to justify loading behavi Timeouts only apply to runtime translations, or translations that need to be performed on demand as they have not been cached. Timeouts are set to 8 seconds by default. -This design decision is to facilitate vercel users who have a default 10-second timeout for serverless functions on the free plan. +This design decision is to facilitate Vercel users who have a default 10-second timeout for serverless functions on the free plan. --- diff --git a/docs/en-US/next/guides/migration.mdx b/docs/en-US/next/guides/migration.mdx index a7af6c92..1502c145 100644 --- a/docs/en-US/next/guides/migration.mdx +++ b/docs/en-US/next/guides/migration.mdx @@ -104,7 +104,7 @@ You'll never have to wait for translations again. 1. Fully migrate your entire project to `gt-next`, and remove the old i18n library. 2. Fully migrate your project, but keep using dictionaries from the old i18n library. - 2. Keep using the old i18n library for now, and only migrate part of your project to `gt-next`. + 3. Keep using the old i18n library for now, and only migrate part of your project to `gt-next`. For more details on each option, see the [migration strategies](#strategies) section. @@ -221,7 +221,7 @@ We offer it as a way to make migration easier, but we don't recommend using it f ### 3. Using AI -If you are using AI to help you migrate your project, we have a `LLMs.txt` and `LLMs-full.txt` available at: +If you are using AI to help you migrate your project, we have an `LLMs.txt` and `LLMs-full.txt` available at: - [LLMs.txt](/llms.txt) - [LLMs-full.txt](/llms-full.txt) diff --git a/docs/en-US/next/tutorials/examples/next-speedrun.mdx b/docs/en-US/next/tutorials/examples/next-speedrun.mdx index 315d130a..9ab98a1b 100644 --- a/docs/en-US/next/tutorials/examples/next-speedrun.mdx +++ b/docs/en-US/next/tutorials/examples/next-speedrun.mdx @@ -42,7 +42,7 @@ npm i gt ## Step 3: Add your environment variables. Navigate to the [Dashboard](https://generaltranslation.com/en-US/signin). -Go to the Dev Api Keys page on the nav bar and create a new API key and Project ID. +Go to the Dev API Keys page on the nav bar and create a new API key and Project ID. Then add them to your `.env` file. ```bash copy @@ -116,7 +116,7 @@ If you have set up everything correctly, you should see your app in the language **Browser Cookies** Check your browser's cookies for your app. - General translation uses cookies to store the user's language preference. + General Translation uses cookies to store the user's language preference. The cookie is called `generaltranslation.locale`, and all you need to do is delete it. It will be under `localhost:3000`. Then, just double-check you are using the desired preferred language and then