It's a example of the component showing a list of languages
It's a example of the component showing a dropdown list of languages
Download Code
0 en
1 english
2 This is a code expample used in this demo
3 ...
4 ...
0){
for (i=0;i $value)
{
$jscontext.="'".str_replace("'","\'",$value)."',";
}
$jscontext=substr($jscontext,0,strlen($jscontext)-1);
$this->varname=str_replace($localPath,"",str_replace(".txt","",$flie_name));
echo "archivo: ".$Languagefile[0].".txt (".$Languagefile[1].") procesado
";
$jscontext=$this->varname."=[".$jscontext."]";
$compile.=$jscontext.";\n";
}
$selectlanguages=' ';
for ($i=0;$i'.$lang[$i][1].'';
}
$selectlanguages.='';
$image_size="24px";
$flags='';
for ($i=0;$i';
}
$flags.= '
';
$compile.="flagsSelector='$flags';\n\nlangDownLst='$selectlanguages';\n\n $translatefn";
$this->translationFile=$localPath."languages.js";
if (!$handle = fopen($this->translationFile, 'w'))
{
echo "Can not crate (".$this->translationFile.")...";
exit;
}
if (fwrite($handle, $compile) === FALSE) {
echo "Can not write (".$this->translationFile.")";
exit;
}
fclose($handle);
}
}
$writeConfig = new C_writetranslationfilestojs();
?>
...
...
Input with placeholder translated
Input textarea with value translated
Button with tooltip value translated