FAQ Detail

Question : How to translate the datepicker

Answer :

1. Edit ROOT/application/modules/themes/views/THEME_NAME/edit_ad_view.php file 2. find this line

<script src="/assets/jquery-ui/timepicker.js">

3. Replace that line with

<?php
$file_path = str_replace(base_url(),'./', theme_url()).'/assets/jquery-ui/'.get_current_lang().'-timepicker.js';
if(file_exists($file_path)){ ?>

<?php }else{ ?> <script src="/assets/jquery-ui/timepicker.js"> <?php }?>

4. Now got to ROOT/application/modules/themes/views/THEME_NAME/assets/jquery-ui/ directory 5. you can find a file timepicker.js there 6. Make a copy of this file and rename it to YOUR_LANG-timepicker.js . As an example for Spanish language you need to rename this file to es-timepicker.js 7. Now edit that file and change the text in your own language . You can see all the texts are together

            currentText: 'Now',
            closeText: 'Done',
            amNames: ['AM', 'A'],
            pmNames: ['PM', 'P'],
            timeFormat: 'HH:mm',
            timeSuffix: '',
            timeOnlyTitle: 'Choose Time',
            timeText: 'Time',
            hourText: 'Hour',
            minuteText: 'Minute',
            secondText: 'Second',
            millisecText: 'Millisecond',
            microsecText: 'Microsecond',
            timezoneText: 'Time Zone',

8. Please remember that you must not delete the actual timepicker.js file