FAQs
Technical FAQs
Where does <T> get its translations? What translations does it use?
<T> can technically load translations from anywhere, depending on how you've configured the library.
If you have a project ID, the library can hit a free CDN.
It can also store translations locally, or do a mix of the two.
See the load-translations docs for more details.
During development, so you can see translations hot-reload when you change content, the <T> component hits an API that uses a small AI model to create temporary translations. These translations aren't stored anywhere; they're just served back to the app.
In production, <T> won't do this in order not to leak your API keys.
Why do I have to install the CLI tool?
The CLI tool parses the content inside all <T> components and pre‑generates translations for that content, so all translations are ready when your app is deployed to production. In development, you don’t need it because you can use development API keys to translate on demand.
Is there an automatic fallback for missing translations in production?
Yes. In production, if a translation for some content is missing, the library will automatically fall back to the original source text.
Does the AI translation also work with dynamic content and variables?
The <T> component doesn’t support translating dynamic content and variables, because this would mean the translations could potentially change with every re-render. However, you can still include dynamic content and variables inside a <T> by wrapping them with <Var>, <Datetime>, <Currency> components. This is similar to how other libraries handle string interpolation.
For gt-next, there’s also a <Tx> server-side component which does perform translations on the spot in production and supports any form of dynamic content, but it requires an API key.
How does the offline system work? Can I deploy an application with GT without relying on your servers?
Yes, you can, but you’ll need to handle the translations yourself, then load them from either your own bundle or your own CDN. See our docs on that here: link.
Business FAQs
Do I own my translations?
Yes.
You, the customer, retain full ownership and rights to any translated output produced through the Services. We make no claim to your output.
For more, see our Terms of Use.
General FAQs
What are tokens?
When text is sent to GT APIs, it is broken down into chunks called tokens. Think of tokens as small pieces of your input text, like words or parts of words, that an AI model uses to understand and translate your content.
A useful rule of thumb is that one token generally corresponds to ~4 characters of text for common English. That’s roughly three‑quarters of a word (so 100 tokens ~= 75 words).
For example, the string Hello, world! has 13 characters, and 4 tokens: Hello, ,, world, and !.
If you exceed the token limit for your plan, we begin charging based on token usage. We only ever charge based on the length of your input — never the length of the translation. Read more about our available plans here.
For example, imagine you have the string "Hello, world!", and your project’s languages are "fr" (French), "es" (Spanish), and "de" (German).
Token usage will be calculated as 4 * 3 = 12 — the 4 tokens of "Hello, world!" translated 3 times.
We currently tokenise with OpenAI’s tiktoken, which is the same tokenizer used by GPT-4. You can explore this tokenizer here.
Locales? Languages? Regions? What’s the difference?
Throughout this documentation, you’ll see us use the terms locale and language somewhat interchangeably. For the most part, they do mean the same thing, but there are some subtle differences, which we’ll make clear when necessary.
Language refers to a spoken or written form of human communication.
Region refers to the area where a language is spoken or written. The language may remain the same, but vary between regions—for example, Canadian French versus French as spoken in France.
Locale is a combination of a language and a region, used to specify a particular language in a particular region. For example, en-US is English as spoken in the United States.
How is this guide?