# General Translation Platform: Quickstart URL: https://generaltranslation.com/en-US/docs/platform/core/quickstart.mdx --- title: Quickstart description: Learn what the `generaltranslation` Core library does, when to use it, and how to translate your first string. related: links: - /docs/platform/core/guides/translating-strings - /docs/platform/core/guides/translating-files - /docs/platform/core/guides/locale-codes --- The `generaltranslation` library is General Translation's Core i18n library for translation, formatting, and locale utilities. Most framework apps should start with [gt-react or gt-next](/docs/react/overview). Use `generaltranslation` directly when you want lower-level control, a custom workflow, or translation utilities outside a framework integration. ## What `generaltranslation` does [#what-it-does] `generaltranslation` gives you direct access to: - **String translation** for translating strings or structured content from code. - **File translation** for uploading source files, queueing translation jobs, checking status, and downloading translated output. - **Locale utilities** for validating, comparing, resolving, and displaying locale codes. - **Formatting utilities** for locale-aware numbers, dates, messages, lists, and relative time. ## When to use `generaltranslation` [#when-to-use] Use `generaltranslation` when you need to: - Translate content from a script, backend service, worker, or custom build step. - Upload and download translation files without using the CLI. - Build custom translation automation around Project files, jobs, branches, or tags. - Format numbers, dates, messages, or locale names outside React or Next.js. - Share GT behavior across packages that do not use the same frontend framework. ## Quickstart [#quickstart] Install `generaltranslation`, create a [GT](/docs/platform/core/reference/gt-class/constructor) instance with your Project ID and API key, and translate your first string. ### 1. Install `generaltranslation` ```bash npm install generaltranslation ``` ```bash yarn add generaltranslation ``` ```bash bun add generaltranslation ``` ```bash pnpm add generaltranslation ``` ### 2. Get an API key Create a `GT_PROJECT_ID` and `GT_API_KEY` in the Dashboard. Open the [API Keys page](https://dash.generaltranslation.com/api-keys), click **Create API Key**, enter a name, and confirm. ```bash GT_PROJECT_ID=your-project-id GT_API_KEY=your-api-key ``` General Translation offers high free rate limits for personal Projects, solo developers, and the community. ### 3. Initialize the GT class Initialize the [GT](/docs/platform/core/reference/gt-class/constructor) class and securely pass your `GT_PROJECT_ID` and `GT_API_KEY`. ```typescript title="src/index.ts" import { GT } from 'generaltranslation'; const gt = new GT({ projectId: 'your-project-id', apiKey: 'your-api-key', }); ``` You can configure default locales on the [GT](/docs/platform/core/reference/gt-class/constructor) instance. Use default locales when most calls use the same source or target locale. ```typescript title="src/index.ts" const gt = new GT({ projectId: 'your-project-id', apiKey: 'your-api-key', sourceLocale: 'en', targetLocale: 'es', }); ``` See [GT class](/docs/platform/core/reference/gt-class/constructor) for all constructor options. ### 4. Translate your first string Call the [translate](/docs/platform/core/reference/gt-class-methods/translation/translate) method to translate your first string. Pass the string you want to translate and the target locale. ```typescript title="src/index.ts" const result = await gt.translate('Hello, world!', 'es'); if (result.success) { console.log(result.translation); // "¡Hola, mundo!" } else { console.error(`Translation failed: ${result.error}`); } ``` Translation methods require an API key and Project ID. Formatting and locale utilities can be used without translation API access. ## Next steps - /docs/platform/core/guides/translating-strings - /docs/platform/core/guides/translating-files - /docs/platform/core/guides/locale-codes