Is the core translation layer part of this repo?
This post might have stale content, as main is 138 commits ahead.
Is the core translation layer part of this repo, or it is just SDKs?
Based on my exploration, I can now give you a clear answer:
##This repo contains SDKs/client libraries only, not the core translation engine.
Here's what's in the repository:
###Client-Side Libraries (SDKs)
| Package | Purpose |
|---|---|
gt-next | i18n library for Next.js |
gt-react | i18n library for React |
gtx-cli | CLI tool for continuous localization |
generaltranslation (core) | Core TypeScript library used by the React/Next packages |
supported-locales | Helper library for supported locales |
locadex, mcp, remark, sanity | Various integrations |
###Where's the translation layer?
The actual translation engine is hosted externally on General Translation's cloud services. Looking at the source code in packages/core/src/settings/settingsUrls.ts:
export const defaultCacheUrl = 'https://cdn.gtx.dev' as const;
export const defaultBaseUrl = 'https://api2.gtx.dev' as const;
export const defaultRuntimeApiUrl = 'https://runtime2.gtx.dev' as const;
The translate.ts function makes HTTP POST requests to the external runtime API (runtime2.gtx.dev) to perform translations:
const url = `${config.baseUrl || defaultRuntimeApiUrl}/v1/translate/${config.projectId}`;
response = await fetchWithTimeout(url, { method: 'POST', ... });
###What the core package provides locally:
- Locale utilities (validation, formatting, direction detection, emoji flags, etc.)
- Formatting functions (numbers, currency, dates, lists)
- API client code for communicating with the translation service
- Caching infrastructure
- Type definitions
So in summary: The AI-powered translation logic runs on General Translation's servers. This repo provides the client SDKs that integrate with React/Next.js apps and communicate with that external service.
END OF POST