# General Translation Knowledge Base

> Answers to common questions about localizing apps, docs, and content with General Translation.

Page links point to the plain-markdown view of each page; removing the `.mdx` extension gives the HTML page.

## Latest articles

- [What is translation memory, and do you still need it with AI?](https://generaltranslation.com/en-US/kb/what-is-translation-memory.mdx): Translation memory (TM) is a database of earlier source and target segment pairs that a translation tool searches for exact, in-context, and fuzzy matches. With AI, you still want approved wording reused and past translations available as context. General Translation reuses matching translations from earlier file versions and keeps team edits, without a separate TM to maintain.
- [What are locale codes, such as en-US and en-GB?](https://generaltranslation.com/en-US/kb/locale-codes.mdx): A locale code identifies a language and, when it matters, its script and region, such as en-US for English in the United States or zh-Hant-TW for Traditional Chinese in Taiwan. Most software uses BCP 47 tags built from ISO codes. General Translation uses BCP 47 codes for the source and target locales in gt.config.json.
- [Weglot alternatives: General Translation vs. Weglot](https://generaltranslation.com/en-US/kb/general-translation-vs-weglot.mdx): Weglot is a website translation service that translates rendered pages through plugins, a snippet, or a proxy, and Weglot 2.0 adds JSON translation workflows in GitHub. General Translation is a localization platform that combines source-code internationalization, file translation, shared context, Dashboard review, and locale routing.
- [How do I translate YAML locale files?](https://generaltranslation.com/en-US/kb/translate-yaml-files.mdx): Translate only the string values and keep keys, placeholders such as %{name} or {{name}}, and anchors as they are. Quote values that contain a colon or start with % or {, set each file's locale root or filename, and add the plural keys the target language needs. General Translation's CLI translates YAML values in place and leaves keys alone.
- [How do I translate SEO titles and meta descriptions?](https://generaltranslation.com/en-US/kb/translate-seo-metadata.mdx): Write each language version's title and meta description in that language, using the words that market searches for, which often differ from a literal translation. Then localize the tags around them, including Open Graph, canonical, hreflang, html lang, and structured data. General Translation's gt-next translates titles and descriptions inside generateMetadata with getGT.
- [How do I translate PO and POT files?](https://generaltranslation.com/en-US/kb/translate-po-files.mdx): Fill every msgstr, including each plural form the Plural-Forms header asks for, and keep msgid, msgctxt, and placeholders unchanged. Run msgfmt --check for headers, plural counts, and placeholders on entries with a format flag, and check separately that no msgstr is empty. General Translation's CLI writes a translated PO file for each language from your POT template.
- [How do I translate Lottie animations?](https://generaltranslation.com/en-US/kb/translate-lottie-animations.mdx): Translate the strings in the animation's text layers, stored in the Lottie JSON at t.d.k[].s.t, then check that each translation fits its box, fonts cover the new script, and no text was exported as shapes. Re-export per language, swap text at run time, or script the JSON; General Translation's CLI translates dotLottie 1.0 .lottie files and refits the layout.
- [How do I translate content in Payload CMS?](https://generaltranslation.com/en-US/kb/translate-payload-content.mdx): Add localization to your Payload config and set localized true on each field; Payload then stores one value per locale but doesn't fill them. General Translation's gt-payload plugin adds a Translate button that writes each target locale, as a draft when drafts are enabled and directly otherwise. It never publishes.
- [How do I translate a Flask or FastAPI app?](https://generaltranslation.com/en-US/kb/translate-python-app.mdx): Mark user-facing strings, pick each request's locale (usually from Accept-Language), and load that locale's translations. Flask apps usually use Flask-Babel with gettext catalogs, and FastAPI apps wire Babel into a middleware. General Translation's CLI fills those catalogs, and its experimental gt-flask and gt-fastapi SDKs translate inline t() strings without catalogs.
- [How do I translate .resx files in a .NET app?](https://generaltranslation.com/en-US/kb/translate-resx-files.mdx): Create a culture-named copy of each neutral .resx file, such as Resources.fr.resx, and translate only each entry's value, keeping names, comments, and placeholders such as {0} unchanged. .NET builds each culture into a satellite assembly and falls back from fr-CA to fr to the neutral file. General Translation's CLI writes those culture files from the neutral source.
- [How do I localize an Android app with strings.xml?](https://generaltranslation.com/en-US/kb/localize-android-app.mdx): Keep every default string in res/values/strings.xml, add a strings.xml for each language under a locale-qualified folder such as values-es or values-b+zh+Hant+TW, and read text with stringResource or getString. Translate by hand, in Play Console, or with General Translation's CLI, which writes each values folder and rebuilds plurals for every target language.
- [How do I keep terminology consistent in AI translation?](https://generaltranslation.com/en-US/kb/ai-translation-glossary.mdx): Keep one glossary of approved terms, including names that stay untranslated, apply it to every translation request, keep variables and code out of translation, and review the result. General Translation does this with Context Groups, whose Glossary and Custom Prompts apply to every project you assign them to, plus the Var component for values that are never translated.
- [How do I create a sitemap for a multilingual website?](https://generaltranslation.com/en-US/kb/multilingual-sitemap.mdx): List every language version of each page as its own url entry. If the sitemap carries your hreflang, give each entry xhtml:link alternates for every version, including itself, plus an optional x-default, and split files at 50,000 URLs or 50MB. General Translation's gt-next gives each locale its own URL for the sitemap to list.
- [How do I add i18n to TanStack Start?](https://generaltranslation.com/en-US/kb/add-i18n-to-tanstack-start.mdx): TanStack Start has no built-in i18n, so you add a library that resolves the locale for each server request, usually from a URL prefix or cookie, and loads messages before render. Paraglide JS, react-i18next, and Lingui render translations you supply; General Translation's experimental gt-tanstack-start also generates them from copy written inline in JSX.
- [How do I add i18n to a Next.js Pages Router app?](https://generaltranslation.com/en-US/kb/add-i18n-to-nextjs-pages-router.mdx): Add an i18n block with locales and defaultLocale to next.config.js, and Next.js serves /es and /fr, redirects visitors by browser language, and passes the locale to getStaticProps and getServerSideProps. A library renders the messages; General Translation's gt-next also generates the translations from copy written inline in JSX.
- [General Translation vs. Lingo.dev: which should you use?](https://generaltranslation.com/en-US/kb/general-translation-vs-lingo-dev.mdx): Lingo.dev is built around configurable translation engines, with CLI, React, and GitHub tools to reach them. General Translation is a localization platform: libraries, code context, shared terminology, Dashboard review on every plan, and Locadex, which also internationalizes your code. Choose Lingo.dev for model control per language pair.
- [DeepL alternatives: General Translation vs. DeepL](https://generaltranslation.com/en-US/kb/general-translation-vs-deepl.mdx): DeepL is a machine translation API, so it returns a translation for each text or document you send it. General Translation is a localization platform. It adds what an API leaves to you: context from your code and your team, consistent terms across every surface, review in a Dashboard, and continuous translation with each release.
- [Best AI translation tools for developers: APIs vs. localization platforms](https://generaltranslation.com/en-US/kb/best-ai-translation-tools.mdx): Use a translation API when you already own the localization pipeline. Use General Translation when you want context, consistency checks, review, and continuous delivery managed together. DeepL, Google Cloud Translation, OpenAI, and Claude can power a production pipeline; General Translation provides one for your app, docs, and site.
- [What does the Locadex agent do?](https://generaltranslation.com/en-US/kb/what-is-locadex.mdx): Locadex is General Translation's AI agent which internationalizes your code and translates your content in your GitHub repository. Its automations run when a pull request is opened, when a commit is pushed, or when you start one, and every change arrives as a pull request.
- [How do I translate strings outside JSX?](https://generaltranslation.com/en-US/kb/translate-strings-outside-jsx.mdx): Pass each string that isn't a JSX child, such as a placeholder or a module-scope constant, through a translation function where it renders. General Translation's useGT hook returns that function, and msg with useMessages translates constants defined outside a component.

## Categories

- Internationalization (37 articles): Setting up i18n in a codebase: libraries, frameworks, and components.
- Locale Formatting (5 articles): Plurals, dates, numbers, currencies, and right-to-left text in every locale.
- Translation (15 articles): Machine and AI translation, quality, context, and glossaries.
- Multilingual SEO (6 articles): Locale routing, hreflang, sitemaps, and translated metadata for multilingual sites.
- Workflow Tools (22 articles): Choosing localization tools and keeping translations in sync with continuous localization.

## Index

- [Knowledge Base sitemap](https://generaltranslation.com/en-US/kb/sitemap.md): Every Knowledge Base article with its summary.
