Whole page translation Bootstrap 4.5 theme
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 | |
---|---|---|---|---|---|
1 | 124 | AE215433 | 05.03.2005 00:00:00 | 0 | View Edit Remove |
2 | 124 | CQ287967 | 11.04.2003 00:00:00 | 11044.3 | View Edit Remove |
3 | 124 | ET64396 | 16.04.2005 00:00:00 | 83598.04 | View Edit Remove |
4 | 124 | HI366474 | 27.12.2004 00:00:00 | 47142.7 | View Edit Remove |
5 | 124 | HR86578 | 02.11.2004 00:00:00 | 55639.66 | View Edit Remove |
6 | 124 | KI131716 | 15.08.2003 00:00:00 | 111654.4 | View Edit Remove |
7 | 124 | LF217299 | 26.03.2004 00:00:00 | 43369.3 | View Edit Remove |
8 | 124 | NT141748 | 25.11.2003 00:00:00 | 45084.38 | View Edit Remove |
9 | 128 | DI925118 | 28.01.2003 00:00:00 | 10549.01 | View Edit Remove |
10 | 128 | FA465482 | 18.10.2003 00:00:00 | 24101.81 | View Edit Remove |