A WordPress plugin that replaces standard Arabic month names with Moroccan Arabic month names in localized date
# Moroccan Arabic Months
A WordPress plugin that replaces standard Arabic month names with **Moroccan Arabic** month names in localized dates — the forms commonly used in Moroccan media and everyday speech.
When your site locale is Arabic (`ar`, `ar_MA`, etc.), functions like `wp_date()`, `date_i18n()`, and `get_the_date()` will display months such as **ماي**, **غشت**, **شتنبر**, and **دجنبر** instead of the default MSA (Modern Standard Arabic) equivalents.
## Features
- Automatically applies Moroccan month names when the WordPress locale starts with `ar`
- Works with WordPress core date localization (`wp_date()`, `date_i18n()`, theme templates, blocks, etc.)
- Zero configuration — install, activate, and it runs
- Lightweight single-file plugin with no database writes or front-end assets
## Requirements
- WordPress 5.3 or later
- PHP 7.4 or later
- Site locale set to an Arabic locale (e.g. `ar`, `ar_MA`)
## Installation
1. Download or clone this repository into your `wp-content/plugins/` directory so the folder is named `moroccan-arabic-months`.
2. In the WordPress admin, go to **Plugins → Installed Plugins**.
3. Find **Moroccan Arabic Months** and click **Activate**.
Alternatively, zip the plugin folder and upload it via **Plugins → Add New → Upload Plugin**.
## How it works
On `init`, the plugin checks whether the current locale begins with `ar`. If so, it overrides the global `$wp_locale` month tables (`month` and `month_genitive`) with Moroccan Arabic names. Sites using other locales are unaffected.
## Month names
| # | Moroccan Arabic | Common MSA equivalent |
|---|-----------------|----------------------|
| 1 | يناير | يناير |
| 2 | فبراير | فبراير |
| 3 | مارس | مارس |
| 4 | أبريل | أبريل |
| 5 | **ماي** | مايو |
| 6 | يونيو | يونيو |
| 7 | **يوليوز** | يوليو |
| 8 | **غشت** | أغسطس |
| 9 | **شتنبر** | سبتمبر |
| 10 | أكتوبر | أكتوبر |
| 11 | **نونبر** | نوفمبر |
| 12 | **دجنبر** | ديسمبر |
Bold entries highlight the names that differ most notic …