Skip to content

Commit bbf7a6c

Browse files
committed
maint(pat calendar): Document preference of setting the language as lang attribute.
1 parent ad81ecf commit bbf7a6c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/pat/calendar/documentation.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ This is the full initialization tag:
2525

2626
```
2727
<div id="calendar" class="pat-calendar"
28+
lang="de"
2829
data-pat-calendar="
2930
url: http://localhost:8080/Plone/@search?portal_type=Event&start.query=${end_str}&start.range=max&end.query=${start_str}&end.range=min&metadata_fields=start&metadata_fields=end&metadata_fields=whole_day&metadata_fields=location;
3031
initial-date: 2020-10-10;
31-
lang: de;
3232
store: session;"
3333
>
3434
```
@@ -68,4 +68,5 @@ The calendar can be configured through a `data-pat-calendar` attribute. The avai
6868
| `pat-switch-remove` | | CSS class name | Defines the class name to be removed. | string |
6969
| `pat-tooltip-source` | null | null, "ajax" | If set to "ajax" and a URL is configured for an displayed event, it will open the url in a tooltip. | string |
7070
| `pat-modal-class` | null | null, CSS class names | If set to a string of space seperated CSS class names a modal will be initialized on an event. | string |
71+
| `lang` | null | language code | Language of the calendar. You might want to set the ``lang`` attribute on the element or it's container. | string |
7172

src/pat/calendar/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<div id="event-info" class="event-info--inactive">event info here!</div>
1616

1717
<div class="pat-calendar"
18+
lang="de"
1819
data-pat-calendar="category-controls: .cal-categories;
1920
event-sources: ./test_event_source.json,./test_event_source2.json;
2021
add-url: ./test_add_event.html;
@@ -27,7 +28,6 @@
2728
pat-switch-remove: event-info--inactive;
2829
pat-switch-add: event-info--active;
2930
timezone: Europe/Berlin;
30-
lang: en;
3131
store: local;">
3232
<form class="pat-toolbar cal-toolbar pat-form"
3333
id="calendar-toolbar">

0 commit comments

Comments
 (0)