NET Umbraco Core Localization files.
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.
.NET localization has limited use cases in Umbraco, as all backoffice localization is performed with UI Localization.
In other words, .NET localization is only applied server-side with no accompanying UI - for example:
Sending emails.
User login error handling.
Health checks.
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 .NET localization, create new files in the following location and format:
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.
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. You can use the Localize()
method available in the namespace Umbraco.Extensions
to localize the string by area
and key
:
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.
This article overviews how an Umbraco CMS website uses and manages localization with language files.
Language files are used to localise the Umbraco backoffice, so Users can use Umbraco in their native language. This is particularly important for content editors who do not speak English.
With language files, you can also:
Override existing (core) localizations.
Define localization for your own package.
Defines how to use the UI Umbraco Localization. This is the primary source of localization for the backoffice.
Defines how to use the .NET Core Umbraco Localization. This is only relevant for localization that happens server-side - for example, for sending emails.
You can use localization files for Document and Media Types as well. You can find more information about this in the Document Type Localization article.
Current languages with their ISO codes that are included in new Umbraco installations are:
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
- English (United Kingdom) (fallback language)
en-US
- English (United States)
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)