[HelpHub] Feedback on Customize date and time format
URL of the Page with the Issue
https://wordpress.org/documentation/article/customize-date-and-time-format/
Originally reported by
https://profiles.wordpress.org/junaidtahir/
Report content (issue description)
Please include guidance for setting up arabic or urdu language dates/time format
Section of Page with the issue
Why is this a problem?
Suggested Fix
Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.
Add the following content for Arabic or Urdu Date/Time Formats.
Using Arabic or Urdu Date/Time Formats
If your website is in Arabic or Urdu, you may want to display dates and times in a localized format.
1. Ensure Your Site Language is Set
- Go to Settings → General
- Find Site Language
- Select العربية (Arabic) or اردو (Urdu)
2. Use Locale-Specific Date Formatting
WordPress automatically applies localized date formats when the correct site language is set. However, you can also use custom formats:
Arabic Format Example:
- j F Y → ١ مارس ٢٠٢٤
- D, d M Y → الجمعة، ٠١ مارس ٢٠٢٤
Urdu Format Example:
- j F Y → ۱ مارچ ۲۰۲۴
- D, d M Y → جمعہ، ۰۱ مارچ ۲۰۲۴
3. Use a Plugin for Full Localization Support
If your theme does not support localized numerals, you may use plugins like WP Date in Arabic or WP Jalali for enhanced support.
4. Customizing via Code (For Developers)
If you need to manually set the locale for date formatting, you can use:
setlocale(LC_TIME, 'ar_AE.utf8'); // Arabic (UAE)
echo strftime("%A, %d %B %Y"); // Example: الجمعة، ٠١ مارس ٢٠٢٤
By following these steps, you can properly display Arabic or Urdu date/time formats in WordPress.
/assign
Hey @karthick-murugan, thanks for your interest in this issue! 🍪🍪🍪
If you have any questions, do not hesitate to ask them in our #docs Slack channel.
Enjoy and happy contributing ❤️
Heads up @docs-reviewers - the "[Status] Review" label was applied to this issue.