Hello,
There is a way to create my own language based in col title, for example:
$col["title"] = "Estado"; then when change language show it.
Thank you!
You can put IF, ELSE IF calls for it. There is no built in support for this.
e.g.
if ($lang == 'en')
$col1_title = "test";
else if ($lang == 'de')
$col1_title = "test-de";
else if ($lang == 'es')
$col1_title = "test-es";
and then use it in column title,
$col["title"] = $col1_title;
Ok Abu,
This is my code to change language, based in change styles:
<?php
//Create language array
$language = array("english","spanish","italy");
$j = rand(0,8);
// if set from page
if (is_numeric($_GET["languageid"]))
$j = $_GET["languageid"];
else
$j = 1;
?>
//Add string folder from array to path library languages
<head>
<script src="lib/js/jqgrid/js/i18n/<?php echo $language[$j] ?>.js" type="text/javascript"></script>
</head>
//Then in body
<body>
<form method="get">
Change language: <select name="languageid" onchange="form.submit()">
<?php foreach($language as $l=>$u) { ?>
<option value=<?php echo $l?> <?php echo ($j==$l)?"selected":"1"?>><?php echo ucwords($u)?></option>
<?php } ?>
</select>
</form>
</body>
Finally, ¿may to add sentence if in file spanish.js for example?
I believe it's more suitable.
Thank you!