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)
-
Go to the following path on your host or server:
/path-to-whmcs/lang/
(This path depends on where you installed WHMCS.)
-
Open the desired language file (for example, Persian:
persian.php
). -
Look for the
$_LANG['locale']
variable. -
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.
-
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)
-
Go to the following path:
/path-to-whmcs/assets/js/
-
Find the Moment.js file (or a version that is compatible with your WHMCS).
-
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) } });
-
Save the changes and close the file.
3. Set the Theme to display dates
-
Go to the following path:
/path-to-whmcs/templates/
-
Open the template you are using (for example,
six
) and find the relevant JavaScript file. -
In the JavaScript code, add the following option:
$.datepicker.setDefaults({ firstDay: 6 // 6 to start the week on Saturday });
-
Save and load the template.
4. Clear the cache and check for changes
- Clear the browser cache and WHMCS cache.
- 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.