Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@ description: Learn how to manage and use the Backoffice UI Localization files.

## Registering Localization

When registering localizations to a language, you must add a new manifest to the Extension API. The manifest can be added through the `umbraco-package.json` file. Usually, the localization keys are provided through a JavaScript module. In this example, we will use a file named `en.js`:
When registering localizations to a language, you must add a new manifest to the Extension API. The manifest can be added through the `umbraco-package.json` file.

{% hint style="info" %}
The `umbraco-package.json` file is only registered when placed directly in the `/App_Plugins/` or `/App_Plugins/{YourPackageName}` folder. It will not be recognized in nested subfolders.
{% endhint %}

Usually, the localization keys are provided through a JavaScript module. In this example, we will use a file named `en.js`:

{% code title="umbraco-package.json" %}
```json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,22 @@ The localizations are applied by using the syntax `#{area alias}_{key alias}`.
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)
![Applying localization to a property](../images/localization-document-type-editor-validation-v15.png)

* Add a **property** called `#properties_subTitle` with **alias** `subTitle`.
* Set description to `{#properties_subTitle-desc}`.
* Use a `TextString` editor.
* Enable `Allow at root` in the **Structure** tab.

![Applying localization to a Document Type](../images/localization-document-type-editor.png)
![Applying localization to a Document Type](../images/localization-document-type-editor-v15.png)

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)

4. Create a new "Article" content:

![Localized document editing](../images/localization-document-editor.png)
![Localized document editing](../images/localization-document-editor-v15.png)

4. When trying to save the content without adding the mandatory content, you will see a warning as expected:

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.