Skip to content

Commit 00ac670

Browse files
authored
Merge pull request #6957 from warrenbuckley/patch-2
Adds in an example to show how you can use the values inside a manifest
2 parents 4f0bc58 + b25746a commit 00ac670

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

15/umbraco-cms/customizing/foundation/localization.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,33 @@ You can use the same `args` attribute to pass the arguments:
154154
<umb-localize key="section_numberOfItems" args="[5]"></umb-localize>
155155
```
156156

157+
### Using with manifests
158+
You can localize values in a manifest. For example, prefix the name of the dashboard tab visible in the UI with a `#`.
159+
160+
#### Example
161+
A manifest registering a dashboard with `umbraco-package.json` or JavaScript can localize the `label` property in the `meta` object like this.
162+
163+
{% code title="umbraco-package.json" lineNumbers="true" %}
164+
165+
```json
166+
{
167+
"name": "My.WelcomePackage",
168+
"extensions": [
169+
{
170+
"type": "dashboard",
171+
...
172+
"meta": {
173+
"label": "#welcomeDashboard_label",
174+
"pathname": "welcome-dashboard"
175+
},
176+
},
177+
]
178+
}
179+
```
180+
181+
{% endcode %}
182+
183+
157184
## Examples
158185

159186
You can add your own localization keys using the principles you have learned, and apply them in a number of ways:

0 commit comments

Comments
 (0)