localizing-wpf-with-baml

Solid

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

Web & Frontend 40 stars 6 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 78/100

Stars 20%
54
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# 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 localiza...

Details

Author
christian289
Repository
christian289/dotnet-with-claudecode
Created
7 months ago
Last Updated
6 days ago
Language
C#
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category