dotnet-colocated-localization

Automate co-located resource localization with route-based culture in ASP.NET Core.

Updated Feb 20, 2026
One-click install
npx skills add https://github.com/svkaenel/dotnet-with-claude-code --skill dotnet-colocated-localization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-colocated-localization
Source: https://github.com/svkaenel/dotnet-with-claude-code/tree/main/skills/dotnet-colocated-localization
Command: npx skills add https://github.com/svkaenel/dotnet-with-claude-code --skill dotnet-colocated-localization

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

Keeps .resx resource files alongside their views in ASP.NET Core apps, enabling route-based culture detection and a built-in language switcher to streamline internationalization.

Core Features & Use Cases

  • Co-Located Resources: Store resources next to views for clear organization and easier maintenance.
  • Route-Based Culture Detection: Detect user language from the first URL segment (e.g., /de/, /en/).
  • Custom View Localizer: Resolve resources from co-located Resources folders automatically.
  • Language Switch Helper: Translate URLs between languages while preserving localized slugs and suffixes.
  • Reusable UI Components: Include a language switcher component for layouts and pages.

Quick Start

Install and integrate the localization components into your ASP.NET Core project to enable co-located resources, route-based culture detection, and language switching.

Frequently Asked Questions about dotnet-colocated-localization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up co-located localization for .resx resource files in ASP.NET Core?

Co-located localization in ASP.NET Core keeps .resx resource files alongside their corresponding views, automating resource resolution and enabling clearer organization for internationalization.

Can I detect user culture from the URL route segment in ASP.NET Core Razor Pages?

Route-based culture detection extracts the user language from the first URL segment, such as /de/ or /en/, configuring the request culture automatically for Razor Pages and Blazor apps.

What is the best way to implement a language switcher with translated routes in Blazor?

A language switcher helper translates URLs between languages while preserving localized slugs and suffixes, providing reusable UI components that integrate seamlessly into Blazor layouts.

Does co-located localization work with both Razor Pages and Blazor apps?

Co-located localization supports both Razor Pages and Blazor apps, applying custom view localizers and infrastructure classes to resolve resources from adjacent Resources folders automatically.

How do I configure infrastructure classes for production-ready ASP.NET Core internationalization?

Configuring production-ready internationalization involves implementing specific infrastructure classes like custom view localizers and route segment request culture providers, alongside example resources and configuration steps.