Skip to content

docs(next): update locale-aliases for gt-next v11 (getGTClass removed)#341

Closed
moss-bryophyta wants to merge 1 commit into
generaltranslation:mainfrom
moss-bryophyta:docs/fix-locale-aliases-getgtclass-v11
Closed

docs(next): update locale-aliases for gt-next v11 (getGTClass removed)#341
moss-bryophyta wants to merge 1 commit into
generaltranslation:mainfrom
moss-bryophyta:docs/fix-locale-aliases-getgtclass-v11

Conversation

@moss-bryophyta

Copy link
Copy Markdown
Contributor

What

gt-next v11.0.0 (the Odysseus major release) removed the public getGTClass helper from gt-next/server and now exposes resolveCanonicalLocale as a standalone, config-aware function.

The Locale Aliases and SEO guide still imports getGTClass and calls gtInstance.resolveCanonicalLocale(...), which will break on v11.

Fix

Import resolveCanonicalLocale directly from gt-next/server and call it as a function in all four examples (intro, <html lang>, metadata alternates, sitemap).

// before
import { getGTClass } from 'gt-next/server';
const gtInstance = getGTClass();
gtInstance.resolveCanonicalLocale('cn');

// after
import { resolveCanonicalLocale } from 'gt-next/server';
resolveCanonicalLocale('cn');

Verified against the published gt-next@11.0.0 / gt-i18n@1.0.0 type definitions (export { resolveCanonicalLocale } from 'gt-i18n' in server.d.ts).

🌿 Found during the daily docs review.

gt-next v11.0.0 (Odysseus) removed the public getGTClass helper and
exposes resolveCanonicalLocale as a standalone config-aware function
from gt-next/server. Update the Locale Aliases guide to import and call
resolveCanonicalLocale directly instead of via getGTClass().
@moss-bryophyta
moss-bryophyta requested a review from a team as a code owner July 4, 2026 15:03
@moss-bryophyta
moss-bryophyta enabled auto-merge (squash) July 4, 2026 15:03
@moss-bryophyta

Copy link
Copy Markdown
Contributor Author

Closing stale docs PR — docs review is moving to a linter-based workflow going forward, and this backlog is now out of date (per Taylor). Keeping #372 and #373.

auto-merge was automatically disabled July 17, 2026 18:09

Pull request was closed

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