Skip to content

Commit 7e49d01

Browse files
committed
fix(localization): add missing localizations and translations
1 parent 07f6695 commit 7e49d01

File tree

5 files changed

+62
-11
lines changed

5 files changed

+62
-11
lines changed

README.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@ This plugin extends the default link dialog with a search functionality. This ma
1515

1616
These are all available configuration options and their default values.
1717

18-
| Option | Description | Type | Default |
19-
|-------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------|--------------------|
20-
| `title` | Format the page title of the result list using [Kirby Query Language](https://getkirby.com/docs/guide/blueprints/query-language). | `string` | `{{ page.title }}` |
21-
| `filter` | Filter the result list. Learn how to use [`filterBy`](https://getkirby.com/docs/reference/objects/toolkit/collection/filter-by). | `array` | `null` |
22-
| `sort` | Sort the result list. Learn how to use [`sortBy`](https://getkirby.com/docs/reference/objects/toolkit/collection/sort-by). | `array` | `null` |
23-
| `qualified` | Prefix every link with your current [Site-Url](https://getkirby.com/docs/reference/objects/cms/site/url). | `boolean` | `false` |
18+
| Option | Description | Type | Default |
19+
|----------------|-----------------------------------------------------------------------------------------------------------------------------------|-----------|--------------------|
20+
| `title` | Format the page title of the result list using [Kirby Query Language](https://getkirby.com/docs/guide/blueprints/query-language). | `string` | `{{ page.title }}` |
21+
| `filter` | Filter the result list. Learn how to use [`filterBy`](https://getkirby.com/docs/reference/objects/toolkit/collection/filter-by). | `array` | `null` |
22+
| `sort` | Sort the result list. Learn how to use [`sortBy`](https://getkirby.com/docs/reference/objects/toolkit/collection/sort-by). | `array` | `null` |
23+
| `qualified` | Prefix every link with your current [Site-Url](https://getkirby.com/docs/reference/objects/cms/site/url). | `boolean` | `false` |
24+
| `translations` | [Override plugin translations](#localization). | `array` | `[]` |
2425

2526
### Usage
2627

@@ -31,7 +32,8 @@ return [
3132
"title" => "{{ page.title }}",
3233
"filter" => null,
3334
"sort" => null,
34-
"qualified" => false
35+
"qualified" => false,
36+
"translations" => []
3537
]
3638
];
3739
```
@@ -89,6 +91,42 @@ Filtering compendium</a> to learn more about filtering collections in Kirby.</p>
8991

9092
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
9193

94+
## Localization
95+
96+
This is the list of all available translation keys:
97+
98+
| Key | Value |
99+
|---------------------------------------------------------------------------|-----------------------------|
100+
| `gearsdigital.enhanced-toolbar-link-dialog.anchor.title` | Anchor |
101+
| `gearsdigital.enhanced-toolbar-link-dialog.field.autosuggest.placeholder` | Enter a URL or search term… |
102+
103+
104+
You can override translations by adding this to your site config.
105+
106+
```php
107+
// site/config/config.php
108+
return [
109+
"gearsdigital.enhanced-toolbar-link-dialog" => [
110+
"translations" => [
111+
"en" => [
112+
"gearsdigital.enhanced-toolbar-link-dialog.autosuggest.placeholder" => "I'm overridden!",
113+
],
114+
],
115+
]
116+
]
117+
```
118+
119+
### Available languages
120+
121+
- English (default)
122+
- German 🇩🇪
123+
- French 🇫🇷
124+
- Dutch 🇳🇱
125+
- Danish 🇩🇰
126+
- Norwegian 🇳🇴
127+
- Swedish 🇸🇪
128+
- Islandic 🇮🇸
129+
92130
## License
93131

94132
[MIT](https://choosealicense.com/licenses/mit/)

index.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)