You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OpenClaw Tray uses WinUI `.resw` resource files for localization. Windows automatically selects the correct language based on the OS locale — no user configuration needed.
4
+
5
+
## Currently Supported Languages
6
+
7
+
| Language | Locale | Resource File |
8
+
|----------|--------|---------------|
9
+
| English (US) |`en-us`|`Strings/en-us/Resources.resw`|
10
+
| Chinese (Simplified) |`zh-cn`|`Strings/zh-cn/Resources.resw`|
11
+
12
+
## Adding a New Language
13
+
14
+
1.**Copy the English resource file** as your starting point:
5.**Do not translate resource key names** (the `name` attribute). Only translate `<value>` content.
45
+
46
+
6.**Submit a pull request** with just your new `Resources.resw` file. No code changes are needed — the build system automatically discovers new locale folders.
47
+
48
+
## How It Works
49
+
50
+
### XAML strings (automatic)
51
+
Elements with `x:Uid` attributes are automatically matched to resource keys:
Windows picks the language automatically based on the user's OS display language. No in-app language picker is needed.
65
+
66
+
## Testing a Language Locally
67
+
68
+
To test a specific locale without changing your Windows language:
69
+
70
+
1. Open `src/OpenClaw.Tray.WinUI/App.xaml.cs`
71
+
2. Add this line at the top of the `App()` constructor, **before**`InitializeComponent()`:
72
+
```csharp
73
+
LocalizationHelper.SetLanguageOverride("zh-CN");
74
+
```
75
+
3. Build and run (`dotnet build src/OpenClaw.Tray.WinUI -r win-x64`). Remove the line when done testing.
76
+
77
+
> **Note:** This overrides `LocalizationHelper.GetString()` calls (menus, toasts, dialogs, window titles). XAML `x:Uid` bindings follow the OS display language. For full XAML localization testing, change your Windows display language in Settings → Time & Language.
0 commit comments