Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions 15/umbraco-cms/customizing/foundation/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,33 @@
<umb-localize key="section_numberOfItems" args="[5]"></umb-localize>
```

### Using with manifests
You can localize values in a manifest. For example, prefix the name of the dashboard tab visible in the UI with a `#`.

#### Example
A manifest registering a dashboard with `umbraco-package.json` or JavaScript can localize the `label` property in the `meta` object like this.

{% code title="umbraco-package.json" lineNumbers="true" %}

Check warning on line 163 in 15/umbraco-cms/customizing/foundation/localization.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.UmbracoTerms] We prefer 'Umbraco' over 'umbraco.' Raw Output: {"message": "[UmbracoDocs.UmbracoTerms] We prefer 'Umbraco' over 'umbraco.'", "location": {"path": "15/umbraco-cms/customizing/foundation/localization.md", "range": {"start": {"line": 163, "column": 16}}}, "severity": "WARNING"}

```json
{
"name": "My.WelcomePackage",
"extensions": [
{
"type": "dashboard",
...
"meta": {
"label": "#welcomeDashboard_label",
"pathname": "welcome-dashboard"
},
},
]
}
```

{% endcode %}


## Examples

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