diff --git a/15/umbraco-cms/extending/language-files/README.md b/15/umbraco-cms/extending/language-files/README.md index 64b1cda078c..9770bcec6fa 100644 --- a/15/umbraco-cms/extending/language-files/README.md +++ b/15/umbraco-cms/extending/language-files/README.md @@ -15,7 +15,7 @@ With language files, you can also: * Override existing (core) localizations. * Define localization for your own package. -### [UI Localization](../../customizing/ui-localization.md) +### [UI Localization](../../customizing/foundation/localization.md) Defines how to use the UI Umbraco Localization. This is the primary source of localization for the backoffice. diff --git a/15/umbraco-cms/fundamentals/data/defining-content/document-type-localization.md b/15/umbraco-cms/fundamentals/data/defining-content/document-type-localization.md index 02a5d4ba8bf..b137a15c5bc 100644 --- a/15/umbraco-cms/fundamentals/data/defining-content/document-type-localization.md +++ b/15/umbraco-cms/fundamentals/data/defining-content/document-type-localization.md @@ -8,60 +8,57 @@ description: Here you will learn how to apply localization for Document Types in 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. {% endhint %} -The Umbraco backoffice is fully localized to match the user's [configured language](../users.md). When defining Document Types, you can apply localization to: +The Umbraco backoffice is localized to match the [user's configured language](../users/README.md). -* Document Type names and descriptions. +When defining a Document Type, you can apply localization to: + +* Document Type name and description. * Property names and descriptions. * Custom property validation messages. * Tab and group names. Setting up localization for Document Types is a two-step process: -* Create the localizations in [user defined language files](../../../extending/language-files/README.md). -* Apply the localizations to the Document Types. +* Create the localizations in [user defined backoffice localization file](../../../customizing/foundation/localization.md). +* Apply the localizations to the Document Type. {% hint style="info" %} -Everything in this article also applies to defining [Media Types](../creating-media/). +Everything in this article also applies to defining [Media Types](../creating-media/) and Member Types. {% endhint %} ## Creating localizations -User defined language files are created in `/config/lang` and must be named `{language}.user.xml`. For example: `en-us.user.xml`. - -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: - -{% code title="en-us.user.xml" lineNumbers="true" %} - -```xml - - - - Article page - A textual, article-like page on the site. Use this as the main type of content. - Landing page - An inviting, very graphical page. Use this as an entry point for a campaign, and supplement with Articles. - - - Page content - SEO configuration - - - Page titles - - - Main title - This is the main title of the page. - The main title is required for this page. - Sub title - This is the sub title of the page. - - +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: + +{% code title="doctype-en.js" lineNumbers="true" %} +```js +export default { + contentTypes: { + article: 'Article page', + 'article-desc': 'A textual, article-like page on the site. Use this as the main type of content.', + landing: 'Landing page', + 'landing-desc': 'An inviting, very graphical page. Use this as an entry point for a campaign, and supplement with Articles.' + }, + tabs: { + content: 'Page content', + seo: 'SEO configuration', + }, + groups: { + titles: 'Page titles' + }, + properties: { + title: 'Main title', + 'title-desc': 'This is the main title of the page.', + 'title-message': 'The main title is required for this page.', + subTitle: 'Sub title', + 'subTitle-desc': 'This is the sub title of the page.', + } +}; ``` - {% endcode %} {% hint style="info" %} -Umbraco must be restarted to pick up on changes to language files. +Umbraco must be restarted to register the localization manifest. Any subsequent localization text changes will need to be reloaded within the browser. {% endhint %} ## Applying localizations @@ -75,21 +72,25 @@ The localizations are applied by using the syntax `#{area alias}_{key alias}`. * Create a new **tab** called `#tabs_content`. * Add a new **group** called `#groups_titles`. * Add a **property** called `#properties_title` with **alias** `title`. - * Set description to `#properties_title-desc`. + * Set description to `{#properties_title-desc}`. * Use a `TextString` editor. * Enable to `Set this field as mandatory`. * Under validation add `#properties_title-message`. +{% hint style="info" %} +Property descriptions support [Umbraco Flavored Markdown](../../../reference/umbraco-flavored-markdown), which uses a different syntax (wrapped in brackets) to avoid conflicts with Markdown headers. +{% endhint %} + ![Applying localization to a property](../images/localization-document-type-editor-validation.png) * Add a **property** called `#properties_subTitle` with **alias** `subTitle`. - * Set description to `#properties_subTitle-desc`. + * Set description to `{#properties_subTitle-desc}`. * Use a `TextString` editor. -* Enable to `Allow as root` in the **Permissions** tab. +* Enable `Allow at root` in the **Structure** tab. ![Applying localization to a Document Type](../images/localization-document-type-editor.png) -3. When creating and editing the content, you will see that the backoffice now uses the configured localizations. +3. When creating and editing the content, you will see that the backoffice now uses the configured localizations. ![Localized document creation dialog](../images/localization-document-editor-create.png) diff --git a/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor-validation.png b/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor-validation.png index d8d55126d03..4ce31a3eea8 100644 Binary files a/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor-validation.png and b/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor-validation.png differ diff --git a/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor.png b/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor.png index c020c7fa757..2b70a040459 100644 Binary files a/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor.png and b/15/umbraco-cms/fundamentals/data/images/localization-document-type-editor.png differ