Skip to content

Add 'Choosing the right method' quick-reference to Overview pages#243

Open
moss-bryophyta wants to merge 1 commit intomainfrom
docs/choosing-translation-method
Open

Add 'Choosing the right method' quick-reference to Overview pages#243
moss-bryophyta wants to merge 1 commit intomainfrom
docs/choosing-translation-method

Conversation

@moss-bryophyta
Copy link
Copy Markdown
Collaborator

What

Adds a "Choosing the right method" decision table to the SDK Overview pages — the most important docs pages after the Quickstart.

Why

The Overview page introduces 5–6 different translation APIs (<T>, useGT, msg, useTranslations, getGT, withGTConfig). Developers landing here need to quickly understand which method fits their use case — but currently they have to read through every section to figure it out.

This table gives them the answer at a glance:

What you're translating Recommended method
JSX content (headings, paragraphs, buttons) <T>
HTML attributes (placeholder, aria-label, alt) useGT
Strings in objects, arrays, or config files msg + useMessages
Server component strings (Next.js only) getGT
Migrating from another i18n library useTranslations

Plus a callout reinforcing that <T> is the default choice when in doubt.

Scope

  • docs-templates/introduction.mdx — the shared template (generates React Overview and others)
  • docs/en-US/next/introduction.mdx — the Next.js-specific Overview (includes getGT for server components)

Add a decision table to the SDK Overview pages (both the docs-template
and the Next.js-specific introduction) that helps developers quickly
identify which translation method to use for their use case.

This is the most common question developers have when they land on the
Overview page and see 5+ different APIs. The table maps concrete use
cases (JSX content, HTML attributes, config objects, server components,
migrations) to the recommended method, with a callout reinforcing that
<T> is the default choice.
@moss-bryophyta moss-bryophyta requested a review from a team as a code owner April 19, 2026 20:31
@moss-bryophyta moss-bryophyta enabled auto-merge (squash) April 19, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant