You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 15/umbraco-cms/fundamentals/data/defining-content/document-type-localization.md
+42-41Lines changed: 42 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,60 +8,57 @@ description: Here you will learn how to apply localization for Document Types in
8
8
This article is a work in progress and may undergo further revisions, updates, or amendments. The information contained herein is subject to change without notice.
9
9
{% endhint %}
10
10
11
-
The Umbraco backoffice is fully localized to match the user's [configured language](../users.md). When defining Document Types, you can apply localization to:
11
+
The Umbraco backoffice is localized to match the [user's configured language](../users/README.md).
12
12
13
-
* Document Type names and descriptions.
13
+
When defining a Document Type, you can apply localization to:
14
+
15
+
* Document Type name and description.
14
16
* Property names and descriptions.
15
17
* Custom property validation messages.
16
18
* Tab and group names.
17
19
18
20
Setting up localization for Document Types is a two-step process:
19
21
20
-
* Create the localizations in [user defined language files](../../../extending/language-files/README.md).
21
-
* Apply the localizations to the Document Types.
22
+
* Create the localizations in [user defined backoffice localization file](../../../customizing/foundation/localization.md).
23
+
* Apply the localizations to the Document Type.
22
24
23
25
{% hint style="info" %}
24
-
Everything in this article also applies to defining [Media Types](../creating-media/).
26
+
Everything in this article also applies to defining [Media Types](../creating-media/) and Member Types.
25
27
{% endhint %}
26
28
27
29
## Creating localizations
28
30
29
-
User defined language files are created in `/config/lang` and must be named `{language}.user.xml`. For example: `en-us.user.xml`.
30
-
31
-
There are no specific requirements as to how localizations should be structured for use in Document Types. The following localizations have been used for the samples in this article:
<keyalias="article-desc">A textual, article-like page on the site. Use this as the main type of content.</key>
41
-
<keyalias="landing">Landing page</key>
42
-
<keyalias="landing-desc">An inviting, very graphical page. Use this as an entry point for a campaign, and supplement with Articles.</key>
43
-
</area>
44
-
<areaalias="tabs">
45
-
<keyalias="content">Page content</key>
46
-
<keyalias="seo">SEO configuration</key>
47
-
</area>
48
-
<areaalias="groups">
49
-
<keyalias="titles">Page titles</key>
50
-
</area>
51
-
<areaalias="properties">
52
-
<keyalias="title">Main title</key>
53
-
<keyalias="title-desc">This is the main title of the page.</key>
54
-
<keyalias="title-message">The main title is required for this page.</key>
55
-
<keyalias="subTitle">Sub title</key>
56
-
<keyalias="subTitle-desc">This is the sub title of the page.</key>
57
-
</area>
58
-
</language>
31
+
Once you have [registered a backoffice localization file](../../../customizing/extending-overview/extension-types/localization.md), you can add your localization texts for use in Document Types. The following localizations are used for the samples in this article:
'article-desc':'A textual, article-like page on the site. Use this as the main type of content.',
39
+
landing:'Landing page',
40
+
'landing-desc':'An inviting, very graphical page. Use this as an entry point for a campaign, and supplement with Articles.'
41
+
},
42
+
tabs: {
43
+
content:'Page content',
44
+
seo:'SEO configuration',
45
+
},
46
+
groups: {
47
+
titles:'Page titles'
48
+
},
49
+
properties: {
50
+
title:'Main title',
51
+
'title-desc':'This is the main title of the page.',
52
+
'title-message':'The main title is required for this page.',
53
+
subTitle:'Sub title',
54
+
'subTitle-desc':'This is the sub title of the page.',
55
+
}
56
+
};
59
57
```
60
-
61
58
{% endcode %}
62
59
63
60
{% hint style="info" %}
64
-
Umbraco must be restarted to pick up on changes to language files.
61
+
Umbraco must be restarted to register the localization manifest. Any subsequent localization text changes will need to be reloaded within the browser.
65
62
{% endhint %}
66
63
67
64
## Applying localizations
@@ -75,21 +72,25 @@ The localizations are applied by using the syntax `#{area alias}_{key alias}`.
75
72
* Create a new **tab** called `#tabs_content`.
76
73
* Add a new **group** called `#groups_titles`.
77
74
* Add a **property** called `#properties_title` with **alias**`title`.
78
-
* Set description to `#properties_title-desc`.
75
+
* Set description to `{#properties_title-desc}`.
79
76
* Use a `TextString` editor.
80
77
* Enable to `Set this field as mandatory`.
81
78
* Under validation add `#properties_title-message`.
82
79
80
+
{% hint style="info" %}
81
+
Property descriptions support [Umbraco Flavored Markdown](../../../reference/umbraco-flavored-markdown), which uses a different syntax (wrapped in brackets) to avoid conflicts with Markdown headers.
82
+
{% endhint %}
83
+
83
84

84
85
85
86
* Add a **property** called `#properties_subTitle` with **alias**`subTitle`.
86
-
* Set description to `#properties_subTitle-desc`.
87
+
* Set description to `{#properties_subTitle-desc}`.
87
88
* Use a `TextString` editor.
88
-
* Enable to `Allow as root` in the **Permissions** tab.
89
+
* Enable `Allow at root` in the **Structure** tab.
89
90
90
91

91
92
92
-
3. When creating and editing the content, you will see that the backoffice now uses the configured localizations. 
93
+
3. When creating and editing the content, you will see that the backoffice now uses the configured localizations.
0 commit comments