From wpf-dev-pack
Localizes WPF applications using x:Uid attributes and LocBaml tool to generate satellite assemblies for multi-language support. Use for enterprise apps with professional translation workflows.
npx claudepluginhub christian289/dotnet-with-claudecode --plugin wpf-dev-packThis skill uses the workspace's default tool permissions.
Localize WPF applications using x:Uid attributes and LocBaml tool for satellite assembly generation.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Localize WPF applications using x:Uid attributes and LocBaml tool for satellite assembly generation.
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:
<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:
SaveButton, TitleText<!-- .csproj -->
<PropertyGroup>
<UICulture>en-US</UICulture>
</PropertyGroup>
bin/Release/
├── MyApp.exe
├── MyApp.resources.dll
└── ko-KR/
└── MyApp.resources.dll ← Korean satellite assembly
# Parse and extract to CSV
LocBaml /parse MyApp.resources.dll /out:en-US.csv
CSV output format:
MyApp.g.en-US.resources:mainwindow.baml,MainWindow:Window.Title,Title,True,True,None,My Application
MyApp.g.en-US.resources:mainwindow.baml,TitleText:TextBlock.Text,Text,True,True,None,Welcome to My Application
MyApp.g.en-US.resources:mainwindow.baml,SaveButton:Button.Content,Content,True,True,None,Save
Create ko-KR.csv with translations:
MyApp.g.en-US.resources:mainwindow.baml,MainWindow:Window.Title,Title,True,True,None,내 애플리케이션
MyApp.g.en-US.resources:mainwindow.baml,TitleText:TextBlock.Text,Text,True,True,None,내 애플리케이션에 오신 것을 환영합니다
MyApp.g.en-US.resources:mainwindow.baml,SaveButton:Button.Content,Content,True,True,None,저장
# Create Korean satellite assembly
LocBaml /generate MyApp.resources.dll /trans:ko-KR.csv /cul:ko-KR /out:.\ko-KR
# Create Japanese satellite assembly
LocBaml /generate MyApp.resources.dll /trans:ja-JP.csv /cul:ja-JP /out:.\ja-JP
# build-localization.ps1
param(
[string]$ProjectPath = ".",
[string[]]$Cultures = @("ko-KR", "ja-JP", "de-DE")
)
$OutputPath = "$ProjectPath\bin\Release"
$ResourceDll = "$OutputPath\MyApp.resources.dll"
# Extract base resources
LocBaml /parse $ResourceDll /out:"$OutputPath\en-US.csv"
# Generate satellite assemblies for each culture
foreach ($culture in $Cultures) {
$csvPath = "$ProjectPath\Localization\$culture.csv"
$outPath = "$OutputPath\$culture"
if (Test-Path $csvPath) {
New-Item -ItemType Directory -Force -Path $outPath | Out-Null
LocBaml /generate $ResourceDll /trans:$csvPath /cul:$culture /out:$outPath
Write-Host "Generated: $culture"
}
}
// App.xaml.cs
protected override void OnStartup(StartupEventArgs e)
{
// Set culture before any UI is created
var culture = new CultureInfo("ko-KR");
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
base.OnStartup(e);
}
| Element | Localizable Properties |
|---|---|
| Window | Title |
| TextBlock | Text |
| Button | Content, ToolTip |
| Label | Content |
| MenuItem | Header |
| ToolTip | Content |