Claude Skills
CollectionsCompareWorkflowsNominate
Sign inSign up
© 2026 Curated Agent Skills·Learn more about Agent Skills
Back to repository

localizing-wpf-with-baml

verified

Localizes WPF applications using BAML localization with x:Uid attributes and LocBaml tool. Use when building enterprise multi-language applications requiring satellite assemblies.

View on GitHub

Marketplace

dotnet-claude-plugins

christian289/dotnet-with-claudecode

Plugin

wpf-dev-pack

development

Repository

christian289/dotnet-with-claudecode
6stars

wpf-dev-pack/skills/localizing-wpf-with-baml/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/christian289/dotnet-with-claudecode/blob/main/wpf-dev-pack/skills/localizing-wpf-with-baml/SKILL.md -a claude-code --skill localizing-wpf-with-baml

Installation paths:

Claude
.claude/skills/localizing-wpf-with-baml/
Powered by add-skill CLI

Instructions

# WPF BAML Localization

Localize WPF applications using x:Uid attributes and LocBaml tool for satellite assembly generation.

## 1. BAML Localization Overview

```
BAML Localization Workflow
├── 1. Add x:Uid to XAML elements
├── 2. Set UICulture in project
├── 3. Build to generate default resources
├── 4. Extract with LocBaml /parse
├── 5. Translate CSV files
└── 6. Generate satellite assemblies with LocBaml /generate
```

**When to use BAML:**
- Enterprise applications with professional translation workflow
- Need to localize without recompiling
- Complex UI with many localizable properties

---

## 2. Adding x:Uid Attributes

```xml
<Window x:Class="MyApp.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Uid="MainWindow"
        Title="My Application">
    <Grid x:Uid="MainGrid">
        <StackPanel x:Uid="ContentPanel">
            <TextBlock x:Uid="TitleText" Text="Welcome to My Application"/>
            <TextBlock x:Uid="DescriptionText" Text="Please select an option below."/>
            <Button x:Uid="SaveButton" Content="Save"/>
            <Button x:Uid="CancelButton" Content="Cancel"/>
            <Button x:Uid="HelpButton" Content="Help" ToolTip="Click for help"/>
        </StackPanel>
    </Grid>
</Window>
```

**x:Uid naming conventions:**
- Use descriptive names: `SaveButton`, `TitleText`
- Unique within the XAML file
- Applied to elements with localizable properties

---

## 3. Project Configuration

### 3.1 Set UICulture

```xml
<!-- .csproj -->
<PropertyGroup>
    <UICulture>en-US</UICulture>
</PropertyGroup>
```

### 3.2 Build Output Structure

```
bin/Release/
├── MyApp.exe
├── MyApp.resources.dll
└── ko-KR/
    └── MyApp.resources.dll    ← Korean satellite assembly
```

---

## 4. LocBaml Tool Usage

### 4.1 Extract Resources

```bash
# Parse and extract to CSV
LocBaml /parse MyApp.resources.dll /out:en-US.csv
```

**CSV output format:**

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4364 chars