Knowit.Umbraco.TranslationManager
2.0.0
See the version list below for details.
dotnet add package Knowit.Umbraco.TranslationManager --version 2.0.0
NuGet\Install-Package Knowit.Umbraco.TranslationManager -Version 2.0.0
<PackageReference Include="Knowit.Umbraco.TranslationManager" Version="2.0.0" />
<PackageVersion Include="Knowit.Umbraco.TranslationManager" Version="2.0.0" />
<PackageReference Include="Knowit.Umbraco.TranslationManager" />
paket add Knowit.Umbraco.TranslationManager --version 2.0.0
#r "nuget: Knowit.Umbraco.TranslationManager, 2.0.0"
#:package Knowit.Umbraco.TranslationManager@2.0.0
#addin nuget:?package=Knowit.Umbraco.TranslationManager&version=2.0.0
#tool nuget:?package=Knowit.Umbraco.TranslationManager&version=2.0.0
Knowit.Umbraco.TranslationManager
Two versions are available:
- v1 (
1.x): targets Umbraco 13 (.NET 8). Install withdotnet add package Knowit.Umbraco.TranslationManager --version 1.*- v2 (
2.x): targets Umbraco 17+ (.NET 10), with a Lit/Web Component dashboard and optional AI suggestions. Install withdotnet add package Knowit.Umbraco.TranslationManager
A backoffice dashboard for Umbraco that compares your Umbraco dictionary against how translation keys are actually used in your codebase. It surfaces unused keys, keys referenced in code that are missing from the dictionary, and languages with incomplete translations.
Designed as a developer tool. The dashboard is disabled in production by default. A setup wizard guides first-time configuration and generates the appsettings.json snippet, with support for multiple scan sources and a live preview.
Requirements
- Umbraco 13.4 or later (v1) / Umbraco 17 or later (v2)
- .NET 8 (v1) / .NET 10 (v2)
Installation
dotnet add package Knowit.Umbraco.TranslationManager
No changes to Program.cs or Startup.cs needed. The package registers itself on startup.
Configuration
Add a TranslationManager section to appsettings.json. The first time you open the dashboard without any configuration, a setup wizard will guide you through it and generate the snippet to paste.
If you prefer to configure manually:
"TranslationManager": {
"ScanSources": [
{
"Name": "Razor",
"RootPath": ".",
"FilePatterns": ["*.cshtml", "*.cs"],
"KeyPattern": "GetDictionaryValue(?:OrDefault)?\\(\\s*\"([^\"]+)\""
}
]
}
RootPath is relative to the Umbraco content root. Add as many sources as your project needs.
Scan source examples
React / i18next: matches t("some.key")
{
"Name": "React",
"RootPath": "../frontend/src",
"FilePatterns": ["*.tsx", "*.ts", "*.jsx", "*.js"],
"KeyPattern": "\\bt\\(['\"]([^'\"]+)['\"]\\)"
}
Vue / vue-i18n: matches $t("some.key")
{
"Name": "Vue",
"RootPath": "../frontend/src",
"FilePatterns": ["*.vue", "*.ts", "*.js"],
"KeyPattern": "\\$t\\(['\"]([^'\"]+)['\"]\\)"
}
Angular / ngx-translate: matches 'some.key' | translate
{
"Name": "Angular",
"RootPath": "../frontend/src",
"FilePatterns": ["*.ts", "*.html"],
"KeyPattern": "'([^']+)'\\s*\\|\\s*translate"
}
Constants class: for projects where dictionary keys are referenced through a C# constants class rather than inline strings
{
"Name": "C#",
"RootPath": ".",
"FilePatterns": ["*.cs", "*.cshtml"],
"KeyPattern": "GetDictionaryValue(?:OrDefault)?\\(\\s*\\w+\\.(\\w+)",
"ConstantsPattern": "const string (\\w+)\\s*=\\s*\"([^\"]+)\""
}
ConstantsPattern takes two capturing groups: the constant name and its string value. The scanner builds a lookup table first, then resolves captured identifiers through it.
Options
"TranslationManager": {
"CacheDurationMinutes": 5,
"ExcludedDirectories": ["node_modules", "bin", "obj", ".git", "dist", "wwwroot"],
"ScanSources": []
}
| Option | Default | Description |
|---|---|---|
CacheDurationMinutes |
5 |
How long scan results are cached. Set to 0 to disable |
ExcludedDirectories |
see above | Directory names skipped during file traversal |
Dashboard
Once configured, a Translation Manager section appears in the Umbraco backoffice.
Unused: dictionary keys that exist but are not referenced in any configured source. Select any number and delete them in bulk.
Missing: keys referenced in code that do not exist in the dictionary. Expand any row to add the key with translations for each configured language.
Completeness: keys that exist in the dictionary but are missing a translation for one or more languages.
All keys: full overview with source badges showing where each key is used. Every row links to the key in the Umbraco dictionary editor.
v2 differences (Umbraco 17+)
v2 replaces the AngularJS dashboard with a Lit/Web Component UI that is compatible with Umbraco 14 and later. Additional changes:
- Optional integration with Umbraco.AI provides translation suggestions when adding missing keys.
- Targets
net10.0and requires Umbraco 17 or later. - The NuGet package ID is unchanged (
Knowit.Umbraco.TranslationManager); v2 is the default (latest) version.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Umbraco.Cms.Web.Common (>= 17.0.0 && < 18.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.