Beware of Contranyms

Contranyms, also known as auto-antonyms, are a linguistic phenomenon that can trip up inexperienced human translators and machine translation systems. What is a contranym?

Contranym: a word with two opposite meanings, e.g. sanction (which can mean both ‘a penalty for disobeying a law’ and ‘official permission or approval for an action’).

Let’s look at some examples:

Clip can mean “attach” or “cut off”.

Ambiguous sentence: “I’m going to clip that.” Are we applying a barrette to hair or trimming a floral arrangement? Or might this refer to making a short video clip?

Dust can mean “to remove dust (cleaning a house)” or “to add dust” (e.g. to dust a cake with powdered sugar).

Ambiguous sentence: “Dust that.” Are we cleaning a shelf or sprinkling powdered sugar on a cake?

Oversight can mean “accidental omission or error”, or “close scrutiny and control”.

Ambiguous sentence: “Their oversight caused delays.” Were the delays caused by an accidental omission or by close scrutiny?

In each instance, context is the key to understanding. An experienced translator will be aware of contranyms in both the source and target languages, and skillfully discern the correct meaning from contextual clues in the surrounding text. What are your favorite contranyms in English or a different language?

Read more about contranyms on Wikipedia.

Localization No-No: Programmatically Constructing Strings

Given my technical specialization, several of my clients are small-to-medium Russian software companies. Asking me to provide an English translation of their apps/services is often their first step toward software localization. In this post, I want to raise awareness about a common localization no-no: programmatically constructing UI strings.

Don’t construct UI strings programmatically

Why is this a problem? When programmers assemble strings programmatically they do not provide translators with the ability to rearrange elements of a string according to the grammatical and stylistic requirements of the target language. Consider this real-world example.

Source provided to translator: “Будет удалено {messagesCount, plural, one {# письмо} few {# письма} other {# писем}} от”

The client takes this string and programmatically generates a UI string by appending an email address, e.g.

  • If messagesCount = 1: “Будет удалено 1 письмо от dont_try_this_at_home@localization.com”
  • If messagesCount = 2: “Будет удалено 2 письма от dont_try_this_at_home@localization.com”
  • If messagesCount = 5: “Будет удалено 5 писем от dont_try_this_at_home@localization.com”

All of this assumes that the email address properly belongs at the end of the string. This assumption is true for Russian, but it is not true for many other languages, including English. This imposes unnecessary limitations on how translators can translate the string, sometimes preventing a correct translation.

The desired English translation in this case is something like “1 message from dont_try_this_at_home@localization.com will be deleted”, but the client’s code always puts the email address at the end of the string. Don’t do this!

If programmatically generated strings are the wrong way, then what’s the right way?

Do use format strings

The correct way is to provide a format string that includes all elements of the UI string: numbers, email addresses, dates, etc. Translators need the ability to rearrange everything as required by the target language.

Correct source string: “Будет удалено %d письмо от %s”

Correct target string: ” 1 message from dont_try_this_at_home@localization.com will be deleted “

Rely on a tech-savvy linguist

Avoid costly localization errors by writing your code in a localization-friendly way. I can help you bring your app and/or website to a wider audience. Get in touch today for a quote.