# First Day of the Week Per Language

> Starts calendars and date pickers on Sunday or Monday depending on the current language, instead of one fixed setting for every visitor.

- Type: PHP
- Runs: Run everywhere
- Category: [Multilingual](https://wpide.com/library/category/multilingual/)
- Tags: calendar, locale, week-start
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/i18n-week-start-per-locale/

## Code

```php
$wpide_week_start = array( // Locale => first day of week.
    'en_GB' => 1,
    'de_DE' => 1,
    'fr_FR' => 1,
    'ar'    => 6,
);

add_filter( 'option_start_of_week', function ( $day ) use ( $wpide_week_start ) {
    $locale = determine_locale();

    return isset( $wpide_week_start[ $locale ] ) ? $wpide_week_start[ $locale ] : $day;
} );
```

## Notes

0 = Sunday, 1 = Monday, 6 = Saturday. Locales not listed use Settings > General.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "First Day of the Week Per Language" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
