<div dir="ltr">AutoTranslate based on user Loacle is a disastrous idea, especially if the program is multi-lingual. Eventually what should be LangA - LangB will end up on a system where it is LangA - LangA and make no sense at all.
AutoTranslate also fails badly on such things as LongMonthNames[N] if the Locale is RightToLeft. It returns '???'. The workaround is easy, but I spend too much time writing workarounds. And unless you test with both LeftToRight Locale and a RightToLeft Locale, you are likely to assume that
AutoTranslate will take care of you. You will likely be wrong. <br><br><div class="gmail_quote">On Tue, Jul 31, 2012 at 7:39 PM, Jürgen Hestermann <span dir="ltr"><<a href="mailto:juergen.hestermann@gmx.de" target="_blank">juergen.hestermann@gmx.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 2012-07-31 18:15, schrieb Graeme Geldenhuys:<div class="im"><br>
> In my opinion, your way is a terrible way to do localization! For<br>
> reasons as follows:<br>
> * No auto-detect of language when the application starts up.<br></div>
Why is that not possible? If you can detect the language then you can also simply set the language variable to whatevery is needed and call the caption-routine that switches all captions to the selected language.<div class="im">
<br>
<br>
<br>
> * When new languages are added, you must rebuild the whole application<br>
> (executable).<br></div>
Yes. But why is this a drawback? It speeds up application start because all is in one exe file without having the need to load a separate language file on startup.<div class="im"><br>
<br>
<br>
> * You can't use any of the existing PO translating tools which have<br>
> some brilliant<br>
> features like built-in dictionaries, suggested translations, spell<br>
> checking etc.<br></div>
Well, I mostly find all these "brilliant" features more disturbing than helpful. And you also have a learning curve to investigate in these tools that eats up time.<div class="im"><br>
<br>
<br>
> * Quickly see a percentage of translation per language.<br></div>
What do you mean? The number of languages that have been translated? Ok, this might be an issue in a very huge project with hundreds of developers.<div class="im"><br>
<br>
<br>
>> Sometimes<br>
>> translations are very crude because someone simply translates the text one<br>
>> by one like a google translator without knowing what it means and the<br>
>> outcome is often misleading.<br>
> That is why it is important to use good & clear resource string<br>
> constant names. The constant name alone (and maybe with the help of<br>
> existing translations) should make it clear in what context it is<br>
> used, thus helping the translator.<br></div><div class="im">
> rsDate = 'Some Date';<br>
> rsTitle = 'Some dialog title';<br>
> vs<br>
> rsAccountingTransactionDate = 'Some Date';<br>
> rsCentreMaintenanceDialogTitle = 'Some dialog title';<br>
<br></div>
Well, this reduces the probability of miss-translation but if you have the code nearby and maybe even comments then you have much more information of what is meant in this case.<br>
<br>
Also, sometimes the length of the text is important too (so that a button caption can still be displayed and does not exceed the borders). If you only see a variable name then you don't know about these constraints.<br>
<br>
<br>
<br>
Nevertheless, if lots of people are working on a large project an external file may be of use because the translator may neither be a programmer nor a program user (although in such cases translations are not very good IMO). But for smaller projects this is very convenient and saves cluttering information in too many files and has the mentioned advantages.<div class="HOEnZb">
<div class="h5"><br>
<br>
<br>
--<br>
______________________________<u></u>_________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.<u></u>freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.<u></u>freepascal.org/mailman/<u></u>listinfo/lazarus</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Shalom,<br>Avishai<br><a href="mailto:avishai.gore@gmail.com">avishai.gore@gmail.com</a><br>אבישי גוֹר<br>
</div>