Skip to content

Commit 0f365af

Browse files
Adds in an example to show how you can use the values inside a manifest
1 parent 847b1e9 commit 0f365af

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,31 @@ 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 the name of the dashboard tab that is visible in the UI, by prefxing the value with a #.
159+
For example a manifest for registering a dashboard with umbraco-package.json or via JavaScript can localize the label property in the meta object like so.
160+
161+
{% code title="umbraco-package.json" lineNumbers="true" %}
162+
163+
```json
164+
{
165+
"name": "My.WelcomePackage",
166+
"extensions": [
167+
{
168+
"type": "dashboard",
169+
...
170+
"meta": {
171+
"label": "#welcomeDashboard_label",
172+
"pathname": "welcome-dashboard"
173+
},
174+
},
175+
]
176+
}
177+
```
178+
179+
{% endcode %}
180+
181+
157182
## Examples
158183

159184
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)