Whole page translation
All page words translation
HIDE CODE
<br> <?php $xcrud = Xcrud::get_instance(); $languages = array( array('en','English'), array('fr','French'), array('de','Germany'), array('es','Spanish')); if(isset($_GET['language'])){ $language = $_GET['language']; }else{ $language = 'en';//default to english } $xcrud->language($language); //gets translation from one of the files based on selection //xcrud/languages/de.ini; //xcrud/languages/fr.ini; //xcrud/languages/es.ini; echo "<label>" . $xcrud->translate_external_text("Select Language") . "</label>"; ?> <select class="select-language selectpicker form-control" title="" data-width="110px"> <?php foreach ( $languages as $val ) { if($language == $val[0]){ echo "<option selected value=" . $val[0] . ">" . $val[1] . "</option>"; }else{ echo "<option value=" . $val[0] . ">" . $val[1] . "</option>"; } } ?> </select> <?php $xcrud->table("payments"); $xcrud->table_name($xcrud->translate_external_text("Payments")); $xcrud->label('checkNumber',$xcrud->translate_external_text("check_number")); $xcrud->label('paymentDate',$xcrud->translate_external_text("payment_date")); $xcrud->label('customerNumber',$xcrud->translate_external_text("check_number")); $xcrud->label('amount',$xcrud->translate_external_text("amount")); echo $xcrud->render(); ?> <script> $(".select-language").change(function(){ var hrefString = window.location.href; hrefString = hrefString.replace('&language=en',''); hrefString = hrefString.replace('&language=fr',''); hrefString = hrefString.replace('&language=de',''); hrefString = hrefString.replace('&language=es',''); window.location = hrefString + "&language=" + $(".select-language").val(); }); </script>
Payments
# | Check Number | Check Number | Payment Date | Amount | Test1 | |
---|---|---|---|---|---|---|
1 | 10364 | OM31496 | 16.07.2020 00:00:00 | 3 | View Edit Remove | |
2 | 103600 | OM31491 | 23.07.2020 00:00:00 | 3 | rus | View Edit Remove |
3 | 11310 | HQ5502 | 20.12.2001 00:00:00 | 40000 | View Edit Remove | |
4 | 112 | HQ55022 | 30.07.2020 00:00:00 | 40000 | View Edit Remove | |
5 | 113 | GG31455 | 16.05.2003 00:00:00 | 45870 | View Edit Remove | |
6 | 114 | MA76552 | 15.12.2004 00:00:00 | 82261 | View Edit Remove | |
7 | 114 | NP60385 | 31.05.2003 00:00:00 | 7565 | View Edit Remove | |
8 | 114 | NR27552 | 10.03.2004 00:00:00 | 44894 | View Edit Remove | |
9 | 119 | DB933704 | 14.11.2004 00:00:00 | 19501.82 | View Edit Remove | |
10 | 119 | LN373447 | 08.08.2004 00:00:00 | 47924.19 | View Edit Remove |