Configures content localization in Orchard Core: attaching LocalizationPart, setting up ContentCulturePicker, culture cookies, Liquid filters, localized sitemaps, GraphQL localizations, and permissions.
Ships in orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
OrchardCore.ContentLocalization (depends on Content Types and
Localization) to manage localized versions of content items. Configure the
site cultures first (see orchardcore-localization).LocalizationPart to every content type that needs translations. Each
item stores its Culture; all translations share a LocalizationSet.OrchardCore.ContentLocalization.ContentCulturePicker (requires
Autoroute) for a front-end culture picker and URL-based culture detection.OrchardCore.ContentLocalization.Sitemaps for localized sitemaps with
hreflang alternates.switch_culture_url and localization_set Liquid filters for custom
culture switchers and lookups.{ "steps": [...] }.sealed modifier, except View Models.{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.ContentLocalization",
"OrchardCore.ContentLocalization.ContentCulturePicker"
]
}
]
}
using OrchardCore.ContentManagement.Metadata;
using OrchardCore.ContentManagement.Metadata.Settings;
using OrchardCore.Data.Migration;
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterTypeDefinitionAsync("Article", type => type
.WithPart("LocalizationPart")
);
return 1;
}
}
{
"steps": [
{
"name": "ContentDefinition",
"ContentTypes": [
{
"Name": "Article",
"DisplayName": "Article",
"Settings": {
"ContentTypeSettings": {
"Creatable": true,
"Listable": true,
"Draftable": true
}
},
"ContentTypePartDefinitionRecords": [
{
"PartName": "LocalizationPart",
"Name": "LocalizationPart"
},
{
"PartName": "TitlePart",
"Name": "TitlePart"
}
]
}
]
}
]
}
Localized content items in a content step share the same LocalizationSet:
{
"steps": [
{
"name": "content",
"data": [
{
"ContentItemId": "[js:uuid()]",
"ContentType": "Article",
"DisplayText": "About",
"Published": true,
"TitlePart": { "Title": "About" },
"LocalizationPart": { "LocalizationSet": "about-set", "Culture": "en-US" }
},
{
"ContentItemId": "[js:uuid()]",
"ContentType": "Article",
"DisplayText": "À propos",
"Published": true,
"TitlePart": { "Title": "À propos" },
"LocalizationPart": { "LocalizationSet": "about-set", "Culture": "fr-FR" }
}
]
}
]
}
IContentLocalizationManager clones an item into another culture and reads
localization sets:
using OrchardCore.ContentLocalization;
using OrchardCore.ContentManagement;
public sealed class TranslationService
{
private readonly IContentLocalizationManager _contentLocalizationManager;
public TranslationService(IContentLocalizationManager contentLocalizationManager)
{
_contentLocalizationManager = contentLocalizationManager;
}
public Task<ContentItem> CreateFrenchVersionAsync(ContentItem contentItem)
=> _contentLocalizationManager.LocalizeAsync(contentItem, "fr-FR");
public Task<ContentItem> FindAsync(string localizationSet, string culture)
=> _contentLocalizationManager.GetContentItemAsync(localizationSet, culture);
}
Other members: GetItemsForSetAsync(), GetItemsForSetsAsync(sets, culture),
DeduplicateContentItemsAsync(), and GetFirstItemIdForSetsAsync() (current
culture, then default culture, then the first item of each set). In Razor,
await Orchard.GetContentCultureAsync(contentItem) returns an item's culture.
Hook into localization with IContentLocalizationHandler or
ContentLocalizationPartHandlerBase<TPart>.
OrchardCore.ContentLocalization.ContentLocalizationPermissions declares
LocalizeContent (localize content for others), LocalizeOwnContent, and
ManageContentCulturePicker (the settings pages). Administrators and Editors
get all three; Authors and Contributors get LocalizeOwnContent.
With the picker feature enabled:
ContentRequestCultureProvider is added as the first request culture
provider; it sets the culture from the content item matching the current URL.ContentCulturePicker shape is added to the front-end Navbar when more
than one culture is supported. Its model exposes CurrentCulture and
SupportedCultures (CultureInfo). Override ContentCulturePicker.cshtml
in a theme to restyle it.RedirectToLocalizedContent route redirects to the item's localization
for the selected culture, otherwise (when RedirectToHomepage is on) the
home page localization, otherwise back to the current page.Settings live under Settings → Localization → Content Culture Picker
(ContentCulturePickerSettings) and Content Culture
(ContentRequestCultureProviderSettings):
{
"steps": [
{
"name": "settings",
"ContentCulturePickerSettings": {
"SetCookie": true,
"RedirectToHomepage": false
},
"ContentRequestCultureProviderSettings": {
"SetCookie": true
}
}
]
}
ContentCulturePickerSettings.SetCookie (default true) writes the
CookieRequestCultureProvider cookie when a culture is picked;
ContentRequestCultureProviderSettings.SetCookie writes it from the culture
of the content item matching the URL. The cookie (.AspNetCore.Culture) is
HttpOnly, and Secure when the request is served over HTTPS; client-side
scripts cannot read it, so read the current culture from the page (for example
the lang attribute of <html>).
{
"OrchardCore": {
"ContentLocalization": {
"CulturePickerOptions": {
"CookieLifeTime": 14
}
}
}
}
CookieLifeTime is in days (default 14) and can also be set per tenant under
OrchardCore:{TenantName}:ContentLocalization:CulturePickerOptions.
switch_culture_urlReturns the RedirectToLocalizedContent URL for a target culture and the
current path and query string:
{{ "fr" | switch_culture_url }}
/RedirectToLocalizedContent?targetCulture=fr&contentItemUrl=%2Fblog
localization_setReturns the content item of a localization set in the given culture (the request culture when omitted). An array of sets returns one item per set.
{% assign localizedItem = Model.ContentItem.Content.LocalizationPart.LocalizationSet | localization_set: "en" %}
{{ localizedItem.DisplayText }}
{% assign current = Model.ContentItem.Content.LocalizationPart.LocalizationSet | localization_set %}
The Liquid Culture object lists the site cultures:
<ul class="culture-switcher">
{% for culture in Culture.SupportedCultures %}
<li class="{% if culture.Name == Culture.Name %}active{% endif %}">
<a href="{{ culture.Name | switch_culture_url }}">{{ culture.NativeName }}</a>
</li>
{% endfor %}
</ul>
culture:fr-FR in the search
box) and shows each item's culture and translations.OrchardCore.ContentLocalization.Sitemaps replaces the sitemap content items
query to emit localized URLs with alternates.localizationPart { culture localizationSet localizations { contentItemId } }
on content types with the part.LocalizationSetContentPickerField) is a
bootstrap-select picker in 4.0, like the content picker (see orchardcore-content-fields);
update overrides of LocalizationSetContentPickerField.Edit.cshtml from the new view.orchardcore-admin-edit-views).AdminCulturePicker.cshtml, OrchardCore.Localization)
renders each language as a <button type="button" class="language-menu-item dropdown-item" data-language-value="...">
instead of a <div>, so it is keyboard and screen reader accessible, and no longer overflows the
top bar on small screens. Overrides should keep the language-menu-item class and data-language-value.OrchardCore_ContentLocalization_CulturePickerOptions →
OrchardCore:ContentLocalization:CulturePickerOptions (the old name still
binds but is deprecated).OrchardCore.ContentLocalization.Permissions.LocalizeContent,
LocalizeOwnContent, and ManageContentCulturePicker were removed; use the
same members of OrchardCore.ContentLocalization.ContentLocalizationPermissions.HttpOnly (and Secure over HTTPS). Scripts that
read .AspNetCore.Culture through document.cookie must read the culture
from the rendered page instead.What SKILL.md sets; muted values are Claude Code's defaults
/orchardcore:orchardcore-content-localizationfrom orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin orchardcore140 skills in this plugin
/orchardcore-adminGuidance for the Orchard Core admin panel, including admin controllers and routes, admin menu registration with AdminNavigationProvider, ocat editor forms grouped in cards, admin pages rendering Model.Editor, the UI text casing standard, TheAdmin layout and menu colors, admin branding, the Navbar shape, the Ctrl+K quick navigation palette and QuickNavigationSource, AdminSettings such as MenuBehavior, ShowBreadcrumb, DisplayQuickNavigation, DisplayTitlesInTopbar and ActionsLayout, the AdminDashboard shape, settings pages, and admin filters and zones. Use this skill when requests mention the Orchard Core admin panel, TheAdmin, admin controllers, admin menu registration, an icon on an admin menu item, the AdminSettings recipe step, quick navigation, navigation menu behavior, the admin URL prefix, UI text casing. Strong matches include OrchardCore.Admin, AdminSettings, AdminPermissions, AdminOptions, AdminAttribute, SiteDisplayDriver, IDisplayManager./orchardcore-admin-dashboardSkill for creating admin dashboard widgets in Orchard Core. Covers the DashboardWidget stereotype, DashboardPart position and sizing, the built-in HtmlDashboardWidget, ContentsMetadata and ContentsTags widget types, custom widget content types via recipe or migration, arranging widgets in Manage Dashboard mode, widget template customization, provisioning widgets with recipes, dashboard permissions, the DashboardBreadcrumbProvider Dashboard ancestor, and the AdminDashboardContent shape used when the feature is disabled. Use this skill when requests mention Orchard Core Admin Dashboard, Create and Configure Dashboard Widgets, Enabling Admin Dashboard, Widget Configuration Properties, dashboard widget recipes, Dashboard breadcrumb, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminDashboard, DashboardPart, DashboardBreadcrumbProvider, AccessAdminDashboard, ManageAdminDashboard./orchardcore-admin-edit-viewsSkill for writing Orchard Core admin editor views with the ocat CSS classes and cards. Covers Edit views for content parts and fields, field editor variants, part, field and site settings editors, Fields.Edit views, admin pages rendering Model.Editor built with IDisplayManager, the ocat classes and their layout rules, label associations and group captions, part and field wrapper classes, validation, hints and the Hint_Admin shape, cards declared in placement and the Card and CardContainer shapes, split editor shapes, tabs and columns, the edit page action bar, the horizontal form layout, and the UI text casing standard. Use this skill when requests mention Orchard Core admin edit views, admin forms, grouping fields in cards, Edit.cshtml, Fields.Edit.cshtml, Settings.Edit.cshtml, ocat classes, label casing, or field hints. Strong matches include ocat-wrapper, ocat-card, Hint_Admin, PlacementLocationBuilder, IDisplayManager, ContentPartDisplayDriver, SiteDisplayDriver./orchardcore-admin-listsSkill for Orchard Core 4.0 admin index views (list pages) rendered with the AdminList shape. Covers the List and Grid layouts, AdminListContext of TModel, the admin-list and admin-list-column tag helpers, column width and alignment, row display drivers placing shapes for SummaryAdmin and SummaryAdminGrid, row templates and zones, AdminListActions Buttons and Menu layouts, AdminListToolbar, AdminListSearch, the list-management script for select-all and bulk actions, IAdminListColumnsProvider, AdminListOptions, user layout selection, per-list alternates, sortable lists, and upgrading overridden list views. Use this skill when requests mention Orchard Core admin index views, an admin index page, admin lists, converting a hand-written admin listing, grid layout, list columns, row actions menu, or adding a column to the content items list. Strong matches include OrchardCore.Admin.Abstractions, AdminListContext, AdminListColumn, IAdminListColumnsProvider, AdminListOptions, AdminListLayout, ContentsAdminList./orchardcore-admin-menuSkill for creating admin menus in Orchard Core. Covers admin menu content, the link, placeholder, content types, and lists admin node types, the AdminMenu recipe and deployment step, ManageAdminMenu, ViewAdminMenuAll and per-menu ViewAdminMenu permissions from AdminMenuPermissions, custom admin nodes with AdminNode, IAdminNodeNavigationBuilder and AddAdminNode, data localization of node text, rendering in the 4.0 TheAdmin menu, and upgrading from the removed legacy admin menu layout. Use this skill when requests mention Orchard Core Admin Menu, Create and Manage Admin Menus, Admin Menu Deployment Recipe Step, Built-In Admin Node Types, Custom Admin Node Class, LegacyAdminMenuNavigation, or related implementation, setup, or troubleshooting work. Strong matches include OrchardCore.AdminMenu, OrchardCore.AdminMenu.Abstractions, AdminMenuPermissions, LinkAdminNode, PlaceholderAdminNode, OrchardCore.Lists, OrchardCore.Navigation./orchardcore-admin-schemesSkill for the Orchard Core 4.0 TheAdmin redesign and its admin schemes. Covers scheme records with their four colors, typography, density, corners, horizontal form layout and content width, Design > Themes > Schemes, the default scheme, the per-user scheme picker and its cookie, the seven built-in schemes, the AdminSchemes recipe step and Admin Schemes deployment step, the schemes.css stylesheet, the --ta-* design tokens, ta-content-fluid, dark mode utilities and nested color modes, TheOldAdmin and how to switch to it, and the breaking changes for custom admin themes and Layout overrides. Use this skill when requests mention admin schemes, admin colors, rebranding TheAdmin, dark mode of the admin, the admin content width, the horizontal form layout, TheOldAdmin, or upgrading a custom admin theme to the new TheAdmin. Strong matches include AdminScheme, AdminSchemes, DefaultSchemeId, HorizontalFormLayout, ContentWidth, data-ta-scheme, --ta-primary, ta-content-fluid, TheOldAdmin, and OrchardCore.Themes.TheAdmin.Other plugins' skills for the same job