Meteotemplate Translations

Meteotemplate Translations

Hi guys,

I decided to now try to improve the translations of blocks and add missing ones. However, I want to say a few things about this. I have mentioned this before, it will never be a perfect translation. The template is by default created in English and if the translation was to be perfect, it would require making a separate script for each language. This is in practice not possible. First of all there is now over 25 languages available and just imagine how much work this would be to create/update each script 25 times, and second, I obviously don´t speak all these languages so I cannot create the proper word order etc. if I don´t know what each language looks like.

Second problem is lengthy text. I always have a dilema. On one hand, I know that the more strings there are, the more discouraged people will be from translating if there is too much to translate. On the other hand, the more strings, the more accurate the translation will be.

Example:

  • I could create a translation of the word “average” and translation of the word “temperature”. The phrase “average temperature” would then be created by combining the two: average translation + temperature translation
  • or I could simply create a translation for “average temperature”

The second one will of course be more accurate, in English this is irrelevant, but in Czech and in many other languages, the word endings are different, in Czech for example, “average temperature”, “average pressure”, “average precipitation” – in each of these phrases, the word “average” would have a different ending.

Both solutions have pros and cons. The first one allows only translating “average” and then the parameters, which are already translated for other purposes.

Again, let´s look at the example above.

Let´s say we need translations for: temperature, pressure, humidity, average temperature, average pressure, average humidity

In the first case we would only need 4 words: average, temperature, pressure, humidity. In the second case however, we would need 6 translations. And this of course would get much worse when also adding “maximum temperature”, “minimum temperature” etc etc. The more words the bigger the difference between the two approaches.

In this case I usually made a compromise. For the most used phrases (eg. average temperature), I included the whole phrase. But I did not do it in all cases so in phrases like “average monthly temperature”, we would already use “average” + “monthly” + “temperature”. Because think again, we would have to have not just “average temperature”, but also “average monthly temperature”, average daily temperature, maximum daily temperature…. this is getting unrealisticly long.

Then there are problems with grammar. Each language has specific word order, which is sometimes problematic. It is problematic when a dynamic variable is inserted into the phrase. Again an example.

“5 years ago”

Look at the phrase above. In the actual script, such phrase might be written as “variable” + translated “years ago”. This is how the code is structured. But we have a problem here because I will use Czech as an example again. In Czech the word “ago” would go before the number, so in order to change this and get it right, a direct modification would have to be made in the code, it would have to be “something” + variable + “something”, because in Czech we say literally “ago 5 years”.

There are also stylistical problems with for example capitalization. The capitalization is handled by the translation function – this is again so that you don´t have to translate “temperature” and “Temperature” separately. You might think this is not a problem, but it actually is in languages like German, where all nouns must be capitalized and the script obviously does not know what is a noun when it is translating a phrase consisting of more words. In English this problem arises with days of the week and months.

Next problem, long texts…. when there is some long definition, it gets complicated. The language database on my server has limited length for each translation. And more importantly, it gets back to the fact that when someone asks me to add a new language and starts translating, when they see long paragraphs they just leave it. Usually this is not such a major issue, these long texts tend to be just some detailed definitions, which are for example revealed when clicking the “more” link, but the main part of the block/plugin is translated.

Last problem is when using data from external sources. If the text from the external source is not 100% consistent, then it obviously cannot be translated either, because it is changing and we don´t know what the phrase will be. This is often an issue with textual forecasts and the only solution in this case (which I did) is to create special blocks for countries, which use the corresponding language.

I just wanted to explain a bit more why the template cannot be 100% accurate in all languages. Nevertheless, as I said, I will now try to improve this at least a little bit and achieve my current goal – make it understandable – not perfect – but understandable. 

And last but not least, thanks to all of you for your co-operation because without you there would obviously be no translations. Every translation is always done by a native speaker and for me this is also interesting because given I add each word separately myself, I learned some interesting things 🙂

2 thoughts on “Meteotemplate Translations

Leave a Comment