To set the week start day in WHMCS, you need to make the necessary changes to the relevant language or configuration files. Follow these steps:


1. Changing the start day of the week via the language file (Locale)

  1. Go to the following path on your host or server:

    /path-to-whmcs/lang/
    

    (This path depends on where you installed WHMCS.)

  2. Open the desired language file (for example, Persian: persian.php).

  3. Look for the $_LANG['locale'] variable.

  4. Edit its value as follows:

    $_LANG['locale'] = 'fa_IR';
    

    This value must match the language and geographic region where the first day of the week is Sunday or Saturday.

  5. Save the changes and close the file.

You are just one click away from purchasing Radib's cloud virtual server, with instant delivery.Click


2. Setting up calendars via Moment.js (for dates)

  1. Go to the following path:

    /path-to-whmcs/assets/js/
    
  2. Find the Moment.js file (or a version that is compatible with your WHMCS).

  3. In the configuration code, set the language or locale.
    Example for Persian:

    moment.updateLocale('fa', {
    week: {
    dow: 6 // Week starts on Saturday (0 = Sunday, 6 = Saturday)
    }
    });
    
  4. Save the changes and close the file.


3. Set the Theme to display dates

  1. Go to the following path:

    /path-to-whmcs/templates/
    
  2. Open the template you are using (for example, six) and find the relevant JavaScript file.

  3. In the JavaScript code, add the following option:

    $.datepicker.setDefaults({
    firstDay: 6 // 6 to start the week on Saturday
    });
    
  4. Save and load the template.


4. Clear the cache and check for changes

  1. Clear the browser cache and WHMCS cache.
  2. Refresh the page and check that the first day of the week has changed.

Important tips

  • Be sure to backup the files before editing.
  • If the changes do not apply, clear the browser cache and server cache.
  • For new versions of WHMCS, it may also be necessary to set the languages ​​in the database.

In case of any problems or errors, contact Radib support via ticket.

Was this answer helpful? 101 Users Found This Useful (101 Votes)