Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HelpHub] Feedback on Customize date and time format #1708

Open
zzap opened this issue Oct 8, 2024 · 5 comments
Open

[HelpHub] Feedback on Customize date and time format #1708

zzap opened this issue Oct 8, 2024 · 5 comments
Assignees
Labels
HelpHub feedback Issues reported via feedback form at HelpHub self-assigned [Status] Review Issue in review [Status] To do Issue marked as Todo user documentation (HelpHub) Improvements or additions to end-user documentation

Comments

@zzap
Copy link
Member

zzap commented Oct 8, 2024

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

@zzap zzap added [Status] To do Issue marked as Todo HelpHub feedback Issues reported via feedback form at HelpHub user documentation (HelpHub) Improvements or additions to end-user documentation labels Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

@karthick-murugan
Copy link
Collaborator

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.

@karthick-murugan
Copy link
Collaborator

/assign

Copy link

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 ❤️

@karthick-murugan karthick-murugan added the [Status] Review Issue in review label Feb 5, 2025
Copy link

github-actions bot commented Feb 5, 2025

Heads up @docs-reviewers - the "[Status] Review" label was applied to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HelpHub feedback Issues reported via feedback form at HelpHub self-assigned [Status] Review Issue in review [Status] To do Issue marked as Todo user documentation (HelpHub) Improvements or additions to end-user documentation
Projects
Status: No status
Development

No branches or pull requests

2 participants