DDG
view release on metacpan or search on metacpan
lib/DDG/Manual/Translation.pod view on Meta::CPAN
broken down into
'You have ' + $count + ' messages'
Unfortunately, this would lead to issues further down the line. Translating
only the first and last snippets and reintroducing them into the original
sentence, with the original order, might not yield a coherent sentence in
the target language, again because of the way in which different languages
work, and the way in which words are ordered.
=head2 The issue with direct translation
Not every word has a direct translation in every language. There are many
cases where the meaning of a word will vary greatly because of the context
that the word is in. Furthermore, some words may have more than one corresponding
wordâthe well known myth of the number of <Eskimo words for snow|
http://en.wikipedia.org/wiki/Eskimo_words_for_snow>, wis relevant here.
A concept which may be defined by a single word in the original
language may have many different corresponding words in the target language,
be it because the target language is more nuanced in general or because the
specific subject is particularly well-defined in the target language.
An example of the issues with direct translation is shown below.
In German airlines, it is quite common to read the following:
"Bitte anschnallen!"
The meaning of this sentence is equivalent to the following English sentence:
"Fasten your seat belts!"
However, translating "Bitte anschnallen!" to English would yield this sentence:
"Please fasten!"
This sentence is clearly lacking, and whilst the meaning can be inferred from
context, it would sounds unnatural to most native English speakers.
This is not to say that the sentence in the original language is similarly
laching; in fact, a native German speaker would be very unlikely to
use the direct translation of the English sentence:
"Bitte festschnallen mit ihrem Sicherheitsgurt!"
This sounds just as unnatural to German speaker as "Please fasten!" does to English
speakers. To make the translation sound more fluid and "human" requires, unsurprisingly,
a human element. Translation software is currently unable to take into account
context and select from a list of translations, leading to "errors" such as in the
examples above.
A small subexample that directly comes up: Yes, B<anschnallen> and
B<festschnallen> are actually the same word in english: B<fasten>. B<fasten>
actually translates to L<12 different words in
german|http://dict.leo.org/ende?searchLoc=-1&searchLocRelinked=-1&lp=ende&search=fasten&lp=ende&lang=de&searchLoc=0&searchLocRelinked=1&search=>.
=head2 Right to left
Yes, really, there are languages in the world, which are written right to left.
Beside the mess this brings to your hand if you are right handed, this is also
a huge difference in the web interface. You can see how a right to left page
looks like L<here|http://www.i18nguy.com/unicode/shma.html>. This also changes
about most punctuations and of course the flow of the page itself, even if you
force a specific order, you must revert it from right to left.
=head2 Grammatical numbers
In most languages (like English), there are 2 so called grammatical
cases for numbers: B<singular> and B<plural>. In those languages B<plural> is used, if you
have none, or many. And B<singular> is only used if you have just one:
You have 1 message.
You have 2 messages. (or also 0 or more than 2)
In other languages, there are up to 5 different cases for B<plural>. It Sometimes depends
on complex maths which we don't like to explain, but luckily the world
has defined logic for this. This is a concept implemented in gettext, so this
form is what we actually use, because our implementation is on top of gettext
for most base infrastructure. The English (and most other languages) plural
definition for gettext is:
nplurals=2; plural=(n != 1)
This describes the logic we've mentioned above, that we have 2 grammatical
numbers (B<singular> and B<plural>), and the first plural form is used, if the
amount described is not 1.
Don't be scared! All those definitions are fixed, you can find them on this
awesome page, and you don't need to define them any more (Except if you want to define a
fantasy language) L<http://translate.sourceforge.net/wiki/l10n/pluralforms>.
In Slovak (the language spoken in L<Slovakia|https://duckduckgo.com/Slovakia>)
there are 3 "plural forms", defined by this gettext definition:
nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2
So the text above would require 3 cases:
Mas 1 spravu.
Mas 2 spravy. (or 3 and 4)
Mas 5 sprav. (or also 0 and more than 5)
=head2 Gender cases
Also relevant in most languages, is the gender, which might have influence on
the case of the word. We just mention it in this documentation as an element
that could be taken into concern. So far our system is not able to handle this
problem.
=head1 TRANSLATION SYSTEM
After understanding those base problems that come up, you might see that it is
very intense, in terms of resources, to handle every problem of translations. We don't want
to reinvent the wheel here, but the existing solutions are not covering all of our
needs, which means we need to make our own translation system, by trying to
use as many existing solutions as possible, to reduce the amount of work.
We use our own community platform for managing all the translations. This
allows us to make very individual concepts and workflows specifically for our
needs. Especially, integrating the translation with socializing components and
more visualization options is a key that allows us to give people who
translate the texts the optimum environment for understanding the deeper
( run in 2.013 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )