NET Umbraco Core Localization files.
This page is a work in progress. It will be updated as the software evolves.
In this article, you will find information about the Core Localization files. You can also find information about where to find and use them, and how to keep them up-to-date.
The core Umbraco localization files are found at the following location within the Umbraco source:
These localization files are shipped with Umbraco and should not be modified.
If you want to override Umbraco Core translations or translations shipped with packages, these files are located here:
The /config/lang/
folders do not exist on a clean installation of the CMS. You will need to create them at the root of your project. In an Umbraco Cloud project this will need to be in the src
project.
By default, these files are empty but you can add any new keys you want or override existing ones with your own translations. The nice part about the user files is that they will not get overwritten by the installer when you upgrade your Umbraco versions.
In order for these files to deploy when you do a dotnet publish
, you need to add the following to your .csproj
file:
ILocalizedTextService
is used to localize strings, and is available through dependency injection. First, inject the service, and then use the Localize()
method available in the namespace Umbraco.Extensions
to localize the string with the format [area]/[key]
:
If you are a package developer, see the article for UI Localization.
As Umbraco is a continually evolving product it is inevitable that new text is added regularly to the English language version of these files. This may mean that some of the above languages are no longer up to date.
If a translation is missing, the key "alias" used will be shown within the user interface, as an example:
The language files are XML files with a straight-forward layout as seen below.
In the above example of a missing translation for "assignDomain", locate this string in the en.xml file. Then copy the whole "Key" element into the relevant language file. Afterwards you can translate the text, as an example here is the Spanish version of the above snippet:
If you modify core language files or introduce a new language, you can assist the community by sharing your updates. This can be done by submitting a pull request so that your changes are merged into the core.
Learn how to manage and use the UI Localization files.
If you want the dashboard to be available in different languages, you can use the existing localizations from Umbraco or register your own localizations. The localizations are written as a key-value pair pattern.
To register localizations to a language, you need to add a new manifest to the Extension API. The manifest can be added through the umbraco-package.json
file like this:
If you do not have many translations, you can also choose to include them directly in the meta-object like so:
The localization files for the UI are JS modules with a default export containing a key-value structure organized in sections.
The sections and keys will be formatted into a map in Umbraco with the format section_key1
and section_key2.
These form the unique key they are requested.
The values can be either a string or a function that returns a string:
As Umbraco is an evolving product, new text is regularly added to the English version of these files. Therefore, some of the above languages may no longer be up-to-date.
If a key is not found in the current language, the fallback language will be used. The fallback language is English (United States).
If a translation is missing, the default value within umb-localize
will be shown in the user interface:
Instead of showing the default value we can show the key alias if we set debug="true"
:
The following example shows how you can display localized text with the umb-localize
element:
In some situations, you need the localization as a variable that can be parsed. In this case, the Localization Controller can be used in your element.ts
file. This can be setup in two ways:
If you are working with an Umbraco Controller, then you need to initialize the Localization Controller on your own via the UmbLocalizationController
:
This article overviews how an Umbraco CMS website uses and manages localization files.
Localization files are used to translate:
The Umbraco backoffice user interface so that end users can use Umbraco in their native language. This is particularly important for content editors who do not speak English.
The member identity errors in an Umbraco website enable end users to use Umbraco in the website language.
You can also:
Override existing language files.
Defines how to use the .NET Core Umbraco Localization files.
Defines how to use the UI Umbraco Localization files.
bs-BS
- Bosnian (Bosnia and Herzegovina)
cs-CZ
- Czech (Czech Republic)
cy-GB
- Welsh (United Kingdom)
da-DK
- Danish (Denmark)
de-DE
- German (Germany)
en-GB
- English (United Kingdom)
en-US
- English (United States) (fallback language)
es-ES
- Spanish (Spain)
fr-FR
- French (France)
he-IL
- Hebrew (Israel)
hr-HR
- Croatian (Croatia)
it-IT
- Italian (Italy)
ja-JP
- Japanese (Japan)
ko-KR
- Korean (Korea)
nb-NO
- Norwegian Bokmål (Norway)
nl-NL
- Dutch (Netherlands)
pl-PL
- Polish (Poland)
pt-BR
- Portuguese (Brazil)
ro-RO
- Romanian (Romania)
ru-RU
- Russian (Russia)
sv-SE
- Swedish (Sweden)
tr-TR
- Turkish (Turkey)
ua-UA
- Ukrainian (Ukraine)
zh-CN
- Chinese (China)
zh-TW
- Chinese (Taiwan)
This article describes how you can use the UI Localization files via the .
Using
Using
When using an , the Localization Controller is already initialized on the localize
property via the UmbElementMixin
.
You can find a localization example in the article.
Include translations for your own package. Read to see how to you can achieve this.
You can use localization files for Document and Media Types as well. You can find more information about this in the article.
Current with their ISO codes that are included in new Umbraco installations are: