Get KoolPHP UI with 30% OFF!

Localisation

Michael
If I add:
$grid->Localization->Load("KoolControls/KoolGrid/localization/de.xml");

I am getting the following error:
Warning: DOMDocument::load(): Attribute First redefined in /Applications/MAMP/htdocs/koolphp/KoolControls/KoolGrid/localization/de.xml, line: 29 in /Applications/MAMP/htdocs/koolphp/KoolControls/KoolGrid/koolgrid.php on line 1
and
Warning: DOMDocument::load(): Attribute Last redefined in /Applications/MAMP/htdocs/koolphp/KoolControls/KoolGrid/localization/de.xml, line: 29 in /Applications/MAMP/htdocs/koolphp/KoolControls/KoolGrid/koolgrid.php on line 1
My code:
<?php 
    /*
     * Please put this file in the same folder with KoolControls folder
     * or you may modify path of require and scriptFolder to refer correctly
     * to koolgrid.php and its folder.
     */
    include "KoolControls/KoolGrid/koolgrid.php";
    include "KoolControls/KoolAjax/koolajax.php";
    include "KoolControls/KoolGrid/ext/datasources/PDODataSource.php";
    $koolajax->scriptFolder = "KoolControls/KoolAjax";
    
    $DB_HOST = 'localhost'; //Host name<br>
    $DB_USER = 'sakila'; //Host Username<br>
    $DB_PASS = 'caroline'; //Host Password<br>
    $DB_NAME = 'sakila'; //Database name<br><br>
    $ds = new PDODataSource(new PDO ("mysql:host=$DB_HOST; dbname=$DB_NAME;", $DB_USER, $DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"))); // PDO Connection
 
    $ds->SelectCommand = "select actor_id, first_name, last_name from actor";
 
    $grid = new KoolGrid("grid");
    $grid->scriptFolder = "KoolControls/KoolGrid";
    $grid->DataSource = $ds;
    
    
    $grid->styleFolder = "default";
    $grid->Width = "655px";
    $grid->AjaxEnabled = true;
    $grid->KeepRowStateOnRefresh = true;
    $grid->MasterTable->AllowHovering = true;
    $grid->MasterTable->AllowSelecting = true;
    $grid->MasterTable->AutoGenerateColumns = true;
    $grid->MasterTable->AutoGenerateDeleteColumn = false;
    $grid->MasterTable->AutoGenerateExpandColumn = false;
    $grid->MasterTable->Width = "655px";
    $grid->MasterTable->RowAlternative = true;
    $grid->Localization->Load("KoolControls/KoolGrid/localization/de.xml");
    $grid->MasterTable->Pager = new GridPrevNextAndNumericPager();
 
 
    $grid->Process();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>KoolGrid</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    </head>
    <body>
        <form id="form1" method="post"> <!-- You should render the grid inside a form tag, in case $grid->AjaxEnabled = false the grid needs a form to operate. -->
		<?php echo $koolajax->Render();?>
		<?php echo $grid->Render();?>
	</form>
    </body>
</html>

Any suggestions?
Posted Jul 1, 2016 , edited Jul 1, 2016 Kool
Peter
I think there is error in the de.xml. Please do following:
1. Open the de.xml
2. Looking for the First and the Last attributes in the <commands> tags
3. You will see the duplicate First and Last, so remove the duplication for two of them. Keep the correct translation for each only.
Posted Jul 6, 2016 Kool
Michael
Thanks, this fixed it.
Posted Jul 7, 2016 Kool