Setting up translation strings for a website translation
Thread poster: zoodal

zoodal
Australia
Local time: 21:09
Dec 20, 2015

I am a computer programmer who is preparing a website for translation (I never had to translate a site before - so I am on a learning curve!) and I have a question about preparing the web site text strings for translation.

Many of my strings will have variables embedded in the text to be translated. For example a string may contain none or many variables and would be displayed as follows:

Click the link to view your {{ variable }}.

In the above example, the {{ variable }} will be replaced by an already translated word or words. Depending on the pages where this string will be displayed the {{ variable }} will be a different tanslated word.

This would prevent the almost same string appearing on 30+ pages and requiring translation for each individual string. For example:

Click the link to view your Name Details.
Click the link to view your Address Details.
Click the link to view your Contact Details.

Not counting the variable, would the following string be considered 6 or 7 words to be translated:

Click the link to view your {{ variable }}.

The reason I ask is that the above string can be translated once and displayed on say 30 pages. This approach would be preferred due to the "don't repeat yourself" (DRY) methodology of programming - and cheaper to translate.

Also, can the translation software not include the variables in a text sting when the count is made of the total words to be translated. Which translation software is best suited to this type of translation?


Direct link Reply with quote
 

Endre Both  Identity Verified
Germany
Local time: 13:09
Member (2002)
English to German
Beware of equating programming and natural languages Dec 20, 2015

This approach would be preferred due to the "don't repeat yourself" (DRY) methodology of programming


This is an honourable approach in programming, which however will get you in a horrible mess with natural languages.

One golden rule in UI localisation is that every string should contain a complete utterance.

So, is "Click the link to view your" a complete utterance? No – test failed.

If you don't stick to this rule, you will get all kinds of awkward, ungrammatical or ridiculous-sounding translations. Not always and not in every language: Some languages will similar enough in structure to the source language (in your case English) that you will often – but not always – get away unpunished if you violate this rule. But there will be problems, and the more languages and the more strings there are, the more problems you'll have.

At least for translation, it is likely less work to translate five similar sentences than to make sure that the incomplete sentence will work with all variables you want to use it with. Also, extracting sub-sentence variables from a string carries the risk that you will reuse the variable strings in a context that needs a different translation in your target languages.

Take "address details", which you can use just fine in these two English sentences:
Click the link to view your address details.
Your address details are missing.

So why not just extract both, following programming best practices:
Click the link to view your {0}.
Your {0} are missing.

The anwer is that in many languages, you will need to translate "address details" differently for the two sentences. Additionally, your translators will be scratching their heads when they come across the variable string "address details", because they won't know what context you need it for.

It's a can of worms. Stay away from variables and you'll be a lot happier (if localisation quality matters – otherwise why not just use Google Translate).

Finally, it should be accepted that creating (and maintaining!) a localised version of an interface is costly if you want to do a good job. You can do a poor job – but what's the use if your (prospective) customers will laugh at your efforts and in the worst case draw a connection between the quality of the localisation and the quality of your professional offering? So think twice about what languages you really need your interface in, and be prepared both for a learning curve as you mentioned and for significant cost. There are simply no (or very few) shortcuts.


Direct link Reply with quote
 

Endre Both  Identity Verified
Germany
Local time: 13:09
Member (2002)
English to German
Golden rule No 2 Dec 20, 2015

While I'm at it, let's mention golden rule #2 (which admittedly is a special case of rule 1, no incomplete utterances):

Never concatenate incomplete utterances to variables or other strings to create a complete utterance. So if you need this (sorry for the uninspiring example):
"Today's temperature is x °F"

Don't be tempted to just use "Today's temperature is " + Format(temp, customtempunit)
Use a variable like this:
"Today's temperature is {0}"

This will allow the translator to place the value wherever target grammer mandates it should be in the sentence, and they may even add the missing period at the end.

If you heed these two rules, providing adequate context for every string will be the only remaining problem you'll need to solve for your translators. Unfortunately it's also the biggest problem that no amout of good design will get out of your way. You'll either need screenshots, or comments for each string, or both...

Endre


Direct link Reply with quote
 

zoodal
Australia
Local time: 21:09
TOPIC STARTER
Are there dedicated golden rules? Dec 20, 2015

Endre,

Thank you for your detailed reply.

Is there a link to the "golden rules of translation"?

If there is an accepted list of golden rules, I would be very interested in reading the rules.

Also is there a list of rules to follow for translating a website for a noob?

Thanks again.


Direct link Reply with quote
 

Samuel Murray  Identity Verified
Netherlands
Local time: 13:09
Member (2006)
English to Afrikaans
+ ...
@6233114 Dec 21, 2015

6233114 wrote:
The reason I ask is that the above string can be translated once and displayed on say 30 pages. This approach would be preferred due to the "don't repeat yourself" (DRY) methodology of programming - and cheaper to translate.


This is exactly the approach that is followed by most software translations. It creates a need for extensive beta testing, though. And for a good product, it requires that the programmer is able to program exceptions into the program when they occur.

Let's change your example a bit:
Click the link to view a {{ variable }}.
This is fine... until the variable starts with a vowel. Then you're in trouble, in English. All languages have similar pitfalls.

If you were a non-English programmer programming a program in a non-English language, and the English translator pointed this out to you, would you as the programmer be able to program a fix for this (i.e. have the resources to do it, e.g. let the program evaluate whether the variable starts with a vowel and then select the correct strings for it), so that the English translation of your program always works? And what about all those exceptions that all the other languages' translators tell you about? This can become expensive, in programming costs.

The alternative would be for the translator to translate strings as "Click the link to view a/an {variable}" and "The {variable} is/are not found", which is generally frowned upon. I mean, how would you feel as an English speaker if you visit a web site or use a program that tells you "There is/are 20 photos on this page"?

But yes, most software translation projects actually work that way, and software translators have learnt to come up with tricks to "fix" such sentences.

For example, if the English translator in the example above knew (when translating the list of variables) that all the variables will have to fit into a single boilerplate sentence, he can take steps to ensure that he always translates the variables as words that don't begin with vowels. The problem is that translators who translate lists of variables often can't see how those variables will be used in full sentences, so they have to guess, and hope and pray.

Also, can the translation software not include the variables in a text sting when the count is made of the total words to be translated?


The variable will be counted as one word in most CAT tools that can recognise variables. And it's fair to the translator, because he has to decide where to put the variable (he has to treat the variable as a word anyway).

So, in most CAT tools that I've worked in, word counts would work like this:

string = Please enter a {variable} to continue. (6 words)
variables = phone number; fax number; e-mail address (6 words)
total word count: 12

The translation cost may be low, but then you get testing costs, and problem fixing costs. You might ask if it wouldn't have been cheaper to just let the translators translate this:

Please enter a {variable: phone number} to continue. (6 words)
Please enter a {variable: fax number} to continue. (6 fuzzy words)
Please enter an {variable: e-mail address} to continue. (6 fuzzy words)
variables = phone number; fax number; e-mail address (6 words)

... and see if you can get discounts on fuzzy words. But I've only ever seen one or two software translation projects that worked that way -- it's not the norm.


Direct link Reply with quote
 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

Setting up translation strings for a website translation

Advanced search







SDL MultiTerm 2017
Guarantee a unified, consistent and high-quality translation with terminology software by the industry leaders.

SDL MultiTerm 2017 allows translators to create one central location to store and manage multilingual terminology, and with SDL MultiTerm Extract 2017 you can automatically create term lists from your existing documentation to save time.

More info »
CafeTran Espresso
You've never met a CAT tool this clever!

Translate faster & easier, using a sophisticated CAT tool built by a translator / developer. Accept jobs from clients who use SDL Trados, MemoQ, Wordfast & major CAT tools. Download and start using CafeTran Espresso -- for free

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search