UmbracoLanguagePicker 17.0.2

dotnet add package UmbracoLanguagePicker --version 17.0.2
                    
NuGet\Install-Package UmbracoLanguagePicker -Version 17.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UmbracoLanguagePicker" Version="17.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="UmbracoLanguagePicker" Version="17.0.2" />
                    
Directory.Packages.props
<PackageReference Include="UmbracoLanguagePicker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add UmbracoLanguagePicker --version 17.0.2
                    
#r "nuget: UmbracoLanguagePicker, 17.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package UmbracoLanguagePicker@17.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=UmbracoLanguagePicker&version=17.0.2
                    
Install as a Cake Addin
#tool nuget:?package=UmbracoLanguagePicker&version=17.0.2
                    
Install as a Cake Tool

UmbracoLanguagePicker

A property editor for the Umbraco 17 backoffice. Editors use it to pick one of the languages set up under Settings → Languages. The value is saved as the language's ISO code (for example da-dk), so you can use it in templates to set a culture, filter content, or build language switchers.

Features

  • A dropdown with every language configured in Umbraco, shown by name.
  • Unique filter (optional): a language already picked on one sibling node isn't offered on the others. Useful for trees such as one node per market or language.
  • Allow no value (optional): adds a NONE option so the property can be left empty.
  • Backoffice text in English and Danish.

Requirements

  • Umbraco CMS 17.7.0 or later 17.x
  • .NET 10
Umbraco version Package version
17 17.x
14 14.11.0 (no longer maintained; Umbraco 14 is end of life)

Upgrading from 14.x: 17.0.0 no longer depends on UmbracoKeyValuePropertyEditor, and its API endpoint moved to /umbraco/management/api/v1/umbraco-language-picker/languages. Stored values are unchanged.

Installation

dotnet add package UmbracoLanguagePicker

Build and run the site. When you build, the package copies its backoffice files into App_Plugins/LanguagePicker in your project, and dotnet clean removes them again.

Setup

  1. In the backoffice, go to Settings → Data Types and create a new Data Type.

  2. Choose the UmbracoLanguagePicker property editor (flag icon, in the Common group).

  3. Set the options you need:

    Setting Default What it does
    Unique Filter off Hides languages already used by this property on sibling nodes.
    Allow no value off Adds a NONE option that saves an empty value.
  4. Add a property using the Data Type to any Document Type.

On existing nodes the picker shows the current language with an Edit button. On new nodes it opens as a dropdown straight away.

Using the value

The value is a lowercase ISO code string, such as en-us or da-dk. It's an empty string when Allow no value is on and NONE is picked.

@{
    var languageCode = Model.Value<string>("language");
}

@if (!string.IsNullOrEmpty(languageCode))
{
    var culture = new System.Globalization.CultureInfo(languageCode);
    <p>This page is in @culture.DisplayName</p>
}

With ModelsBuilder, the generated property is a string.

How the unique filter works

When Unique Filter is on, the picker asks the server which languages the same property already uses on the node's siblings, meaning the other children of the same parent, or the other root nodes for a node at the root. Those languages are left out of the dropdown. The node's own current value is always available.

Limitations:

  • Only published siblings are checked, because the lookup uses the published content cache. Unpublished drafts don't count.
  • The filter only changes which options the dropdown shows. Nothing checks the value when a node is saved, so two editors working at the same time can still pick the same language.
  • If the siblings can't be read, the picker shows all languages and logs a warning.

Development

The backoffice UI is a Lit web component in UmbracoLanguagePicker/App_Plugins/LanguagePicker, built with Vite.

cd UmbracoLanguagePicker/App_Plugins/LanguagePicker
npm ci
npm run build     # type-checks and writes dist/
npm run watch     # rebuilds on change

Then build the .NET project from the repository root:

dotnet build

Project layout:

Path Purpose
App_Plugins/LanguagePicker/src/ The property editor web component (TypeScript)
App_Plugins/LanguagePicker/umbraco-package.json Registers the property editor, its settings and translations
App_Plugins/LanguagePicker/Localization/ Backoffice translations (en, en-us, da-dk)
LanguageApiController.cs Management API endpoint (GET /umbraco/management/api/v1/umbraco-language-picker/languages) that returns the available language codes
UmbracoLanguagePickerConverter.cs Property value converter, which returns the value as a string
build/UmbracoLanguagePicker.targets Copies the backoffice files into the consuming site on build

Releasing

Pushing a tag of the form vX.Y.Z from a commit on main runs the GitHub Actions workflow. It builds the client files, packs the NuGet package with version X.Y.Z, and publishes it to nuget.org.

License

MIT

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
17.0.2 57 9/30/2026
17.0.1 54 9/30/2026
17.0.0 61 9/30/2026
14.11.0 300 10/31/2024
14.10.0 252 10/29/2024
14.8.1 273 10/2/2024
13.3.0 297 4/16/2024
13.2.0 275 4/16/2024
Loading failed