Main menu

Using ChatGPT for automatic translation in Loco

This bot is currently experimental and not available without invitation. If you'd like to join our Beta programme, please contact us.

Configure a bot to use ChatGPT

  1. Navigate to the Bots tab wherever you see the :robot icon: in the Loco dashboard.
  2. Click "New bot", choose ChatGPT, and enter your OpenAI API key into the first text field.
  3. Save the bot and it's ready to run. See also how to run a translation bot.

Steps for generating an OpenAI API key

  1. Sign up for an OpenAI account.
  2. Go to the API Keys section of the dashboard.
  3. Check you have sufficient credit for your needs in the billing section.

See our general recommendations for key security and note that your OpenAI key requires write access to use the Chat Completions API.

Model compatibility

Your bot will be configured to use gpt-4o-mini by default, but you can enter any model as long as it's compatible with both the Chat Completions API and Structured Outputs. See Model endpoint compatibility and supported models for structured outputs

Custom prompt

You can enter a custom prompt into your bot configuration. This will be sent in all requests for translations in addition to the basic prompt that Loco sends. You might want to add something general about your project, or the style of text you want, but there's no need to ask it to translate anything; Loco takes care of that.

Avoid entering language specific prompts, unless you plan to use the bot for only that language.

Loco prompts for formal or informal language styles according to each project locale formality setting.

Context

Loco provides ChatGPT with both the context and notes properties of each asset being translated. This is intended to provide meaning when sending single words or very short phrases.

For example, results for the text "Home" will be quite different (in some languages) if you enter "Where the heart is" vs "Button text for website navigation".

Formatted strings

This bot doesn't use the same placeholder protection that we provide for dedicated translation APIs, as it seems to understand most syntax automatically. If you run into problems, try adding something into your custom prompt to explain how the text is formatted.

Last updated by