You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -59,8 +59,8 @@ If the `theme` parameter is specified, any color customizations specified will b
59
59
|`currStreakLabel`| Current streak label |**hex code** without `#` or **css color**|
60
60
|`sideLabels`| Total and longest streak labels |**hex code** without `#` or **css color**|
61
61
|`dates`| Date range text color |**hex code** without `#` or **css color**|
62
-
|`date_format`|Date format (Default: `M j[, Y]`) | See note below on [📅 Date Formats](#-date-formats)|
63
-
|`locale`|Locale to use for labels (Default: `en`)| ISO 639-1 code - See [🗪 Locales](#-locales)|
62
+
|`date_format`| Date format pattern or empty for locale format| See note below on [📅 Date Formats](#-date-formats)|
63
+
|`locale`| Locale for labels and numbers (Default: `en`) | ISO 639-1 code - See [🗪 Locales](#-locales)|
64
64
|`type`| Output format (Default: `svg`) | Current options: `svg`, `png` or `json`|
65
65
|`mode`| Streak mode (Default: `daily`) |`daily` (contribute daily) or `weekly` (contribute once per Sun-Sat week) |
66
66
@@ -83,6 +83,8 @@ To enable a theme, append `&theme=` followed by the theme name to the end of the
83
83
84
84
### 🗪 Locales
85
85
86
+
The following are the locales that have labels translated in Streak Stats. The `locale` query parameter accepts any ISO language or locale code, see [here](https://gist.github.com/DenverCoder1/f61147ba26bfcf7c3bf605af7d3382d5) for a list of valid locales. The locale provided will be used for the date format and number format even if translations are not yet available.
87
+
86
88
<!-- This section is automatically generated by the `translation-progress.php` script. -->
87
89
<!-- prettier-ignore-start -->
88
90
<!-- TRANSLATION_PROGRESS_START -->
@@ -94,6 +96,8 @@ To enable a theme, append `&theme=` followed by the theme name to the end of the
94
96
95
97
### 📅 Date Formats
96
98
99
+
If `date_format` is not provided or is empty, the PHP Intl library is used to determine the date format based on the locale specified in the `locale` query parameter.
100
+
97
101
A custom date format can be specified by passing a string to the `date_format` parameter.
98
102
99
103
The required format is to use format string characters from [PHP's date function](https://www.php.net/manual/en/datetime.format.php) with brackets around the part representing the year.
0 commit comments