Skip to content
Merged
Changes from 1 commit
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
25 changes: 25 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,31 @@
<umb-localize key="section_numberOfItems" args="[5]"></umb-localize>
```

### Using with manifests
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 #.

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

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "15/umbraco-cms/customizing/foundation/localization.md", "range": {"start": {"line": 158, "column": 1}}}, "severity": "WARNING"}
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.

Check warning on line 159 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": 159, "column": 57}}}, "severity": "WARNING"}

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

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words). Raw Output: {"message": "[UmbracoDocs.SentenceLength] Write shorter sentences (less than 25 words).", "location": {"path": "15/umbraco-cms/customizing/foundation/localization.md", "range": {"start": {"line": 159, "column": 1}}}, "severity": "WARNING"}

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

Check warning on line 161 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": 161, "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