Main menu

Machine translation

Automatically translate your Loco project via a third party provider

Loco's bot system provides API integration points for the following machine translation providers:

See the linked pages for information on each provider; what follows is general information for all third party services.

Read first: How to add and run a translation bot.

Key security

Integrating these providers into Loco requires that we store the credentials you use to access the relevant third party APIs. In order for tasks to run in the background, we cannot encrypt the credentials in any way that would prevent our system from reading them.

We don't expose secret credentials in the browser, except when logged in as the person who entered them - the bot owner. You may also notice that in some situations API calls are made directly from your browser. This only happens when you're logged in to Loco as the bot owner. Shared bots are always operated via our back end servers such that secret credentials are never exposed.

Recommended precautions

  • Restrict key usage
    If possible, you should generate API keys specifically for use with Loco, and (if supported by the vendor) restrict key usage to our IP range as well as your own.

  • Minimize privileges
    Some vendors may provide multiple services via the same access credentials. Ensure the credentials we store don't have access beyond the functions you need, and use less privileged service accounts if possible.

  • Delete unused keys
    Once a bot is deleted we have no record of its configuration. Access credentials are not logged anywhere, so you might want to consider removing keys you don't use regularly.

Language support

All supported services will be limited to some extent in the languages they support. Loco attempts to find the most appropriate match for your project locales, but will always attempt translation regardless. We allow APIs to return an error if a language pair is not supported.

You may find that your language works, but your particular region or dialect is wrong. For example: translating into Brazilian Portuguese may produce European Portuguese. This is likely to be because the service supports only the language code "pt" and not "pt-BR".

Loco project locales have a tone/formality setting, which you can modify if you have Developer permissions. This property is reserved for third party APIs that support it. Check the capabilities of your preferred vendor to see if it can be used.

Formatted strings

Most machine translation providers handle simple formatted strings quite well. For example the "%s" pattern in the string "Hello %s, how are you?" is left intact by all the providers we support. Whether the translation system understands it's a placeholder, or just treats it as punctuation, this is more of a bonus than expected behaviour.

Named placeholders are much less reliable. The ICU formatted string "Hello {name}" gets translated (into French) as "Hello {nom}" by all our supported providers. Using less natural variables like "Hello {NAME_OF_USER}" gives mixed results, but in general you can expect automatic translation of this kind of text to require human review.

Placeholder protection

Loco's bot configuration provides an option to protect placeholders in formatted strings. When you enable this option, Loco sends the source text with a less translatable placeholder, and then substitutes the original pattern back into the translation. This relies on undocumented capabilities of the APIs, but we've seen some good results.

Notes and limitations:

  • Placeholder protection is only performed when the asset's format property is set. See String formatting
  • Escape sequences in literal parts of a formatted string such as %% (literal percent) or '{literal}' (ICU braces) are not substituted. This is probably desirable, but always check translations for valid syntax.
  • Translatable text inside nested ICU patterns won't be translatable if their parent element is protected. e.g. Hello {num,plural,one{sir}other{gentlemen}} will protect "num" and "plural", but "sir" and "gentlemen" won't be translated either.

Finally it should be noted that any placeholder potentially subtracts meaning and/or grammatical data from a sentence, so expect the quality of formatted translations to be impacted whether you have placeholder protection enabled or not.

Third party services are subject to their individual terms of use and may incur fees from the provider. Please refer to your service provider's documentation for pricing and terms.

Your usage of translation providers is a legal arrangement between you (the end user of Loco) and the service provider in question. Loco is not party to this agreement, except to the extent that we are sending traffic to their servers and will abide by their terms of use.

We are not reselling access to third party APIs. We provide API integration points, and our software (in some capacities) requires a paid subscription. Billing for these services will come directly from your provider, and will be based on the volume of translation you have configured our software to perform.

We are not responsible for what you do with the translations you store in Loco, whether obtained from machines or humans. Check the attribution requirements of any third party content you use.

Attribution

Content saved automatically into Loco is attributed to the translation service provider by way of a credit in the Loco project management view. Any edit will remove the attribution, but it will remain in the asset's revision history.

When downloading your translations and using them in your own software, you may be required to publicly show a similar attribution. We can't advise more specifically on this topic, but be sure to check the terms of your chosen provider and abide by them.

Last updated by