Dominique Pellé wrote:

> Daniel Naber wrote:
>
>> As no serious bugs were found, I have now activated this for our homepage
>
> Thanks
>
>> There are still some minor issues like incomplete translations.
>
> Indeed. The following strings are in English only with no PHP variable
> to customize their translation:
>
> - label  "Language:"
> - name of all languages (Asturian, Belarussian, Breton, etc.)


For your information, I just added a variable $checkLanguage
to allow translating names of languages in the demo.  Currently
only the Esperanto page uses it but translations can easily be added
now to other languages as well. Here is as an example how the
check form is included in http://www.languagetool.org/eo/
I highlight in red what needs to be added for translations:

<?php
$checkSubmitButtonValue = 'Kontroli';
$showLanguageBox = 1;

$checkDefaultLang = 'eo';

$checkLanguage['auto']  = 'aŭtomate detekti';
$checkLanguage['en-US'] = 'angla';
$checkLanguage['ast']   = 'asturia';
$checkLanguage['be']    = 'belarusa';
$checkLanguage['br']    = 'bretona';
$checkLanguage['zh']    = 'ĉina';
$checkLanguage['da']    = 'dana';
$checkLanguage['eo']    = 'Esperanto';
$checkLanguage['fr']    = 'franca';
$checkLanguage['gl']    = 'galega';
$checkLanguage['de-DE'] = 'germana';
$checkLanguage['es']    = 'hispana';
$checkLanguage['is']    = 'islanda';
$checkLanguage['it']    = 'itala';
$checkLanguage['ca']    = 'kataluna';
$checkLanguage['km']    = 'kmera';
$checkLanguage['lt']    = 'litova';
$checkLanguage['ml']    = 'malajala';
$checkLanguage['nl']    = 'nederlanda';
$checkLanguage['pl']    = 'pola';
$checkLanguage['ro']    = 'rumana';
$checkLanguage['ru']    = 'rusa';
$checkLanguage['sk']    = 'slovaka';
$checkLanguage['sl']    = 'slovena';
$checkLanguage['sv']    = 'sveda';
$checkLanguage['tl']    = 'tagaloga';
$checkLanguage['uk']    = 'ukraina';

$checkDefaultText = "Alglui vian kontrolendan tekston ĉi tie... Aŭ nur
kontrolu tiun ekzemplon. Ĉu vi vi rimarkis, ke estas gramatikaj eraro en
tiu frazo? Rimarku ankaŭ, ke Lingvoilo ankaŭ atentigas pri literumaj
erraroj kiel tiu.";
include("../../include/checkform.php");
?>

Regards
Dominique
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_123012
_______________________________________________
Languagetool-devel mailing list
Languagetool-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/languagetool-devel

Reply via email to