HOW TO allow multi-language calendar in X-Soho template?

Talk and help info about common issues

Moderator: alexandrleonenko

administrator
Site Admin
Site Admin
Posts: 6125
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO allow multi-language calendar in X-Soho template?

Postby administrator » Aug 18th, '16, 19:31

To allow multi-language calendar in X-Soho template do following:

1. Open templates/x-soho/default.php file and find following line of the code:

Code: Select all

<script type="text/javascript" src="<?php echo APPHP_BASE; ?>templates/<?php echo Application::Get('template');?>/js/jquery-ui.js"></script>


replace it with

Code: Select all

<?php if(file_exists(Application::Get('lang'))){ ?>
   <script type="text/javascript" src="<?php echo APPHP_BASE; ?>templates/<?php echo Application::Get('template');?>/js/jquery-ui.<?php echo Application::Get('lang'); ?>.js"></script>
<?php }else{ ?>
   <script type="text/javascript" src="<?php echo APPHP_BASE; ?>templates/<?php echo Application::Get('template');?>/js/jquery-ui.js"></script>      
<?php } ?>   
[code]

2. Create a copy of templates/x-soho/jquery-ui.js with new name templates/x-soho/jquery-ui.xx.js, where xx - is 3-letter abbreviation of yuor language.
For example templates/x-soho/jquery-ui.fr.js

3. open this new file, find there this code and translate it in wished language:
[code]monthNames: ["January","February","March","April","May","June", "July","August","September","October","November","December"], // Names of months for drop-down and formatting
monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], // For formatting
dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], // For formatting
dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], // For formatting
dayNamesMin: ["Su","Mo","Tu","We","Th","Fr","Sa"], // Column headings for days starting at Sunday

Return to “ApPHP Hotel Site {HOW TO}”