--- source_files: - DataPRO/Modules/Reports/PedestrianAndHeadReports/Resources/TranslateExtension.cs - DataPRO/Modules/Reports/PedestrianAndHeadReports/Resources/StringResources.Designer.cs generated_at: "2026-04-17T15:58:30.090059+00:00" model: "zai-org/GLM-5-FP8" schema_version: 1 sha256: "262f426758521cfe" --- # Documentation: PedestrianAndHeadReports Resources Module ## 1. Purpose This module provides localization infrastructure for the `PedestrianAndHeadReports` reporting system. It consists of a XAML markup extension (`TranslateExtension`) that enables declarative string localization in WPF UI, backed by a strongly-typed resource accessor class (`StringResources`) that wraps a `.resx` resource file. The module supports multi-language display of crash test and pedestrian safety report terminology, with Japanese as the apparent default culture based on the resource values. --- ## 2. Public Interface ### `TranslateExtension` (class) **Namespace:** `PedestrianAndHeadReports.Resources` **Inheritance:** `System.Windows.Markup.MarkupExtension` A XAML markup extension that resolves localization keys to translated strings at runtime. | Member | Signature | Description | |--------|-----------|-------------| | Constructor | `TranslateExtension(string key)` | Initializes the extension with the resource key to look up. Stores the key in a private readonly field `_key`. | | `ProvideValue` | `override object ProvideValue(IServiceProvider serviceProvider)` | Returns the localized string for `_key` via `StringResources.ResourceManager.GetString()`. Returns `NotFound` constant if `_key` is null or empty. Returns `NotFound + " " + _key` if the key is not found in resources. | **Constants:** - `private const string NotFound = "#stringnotfound#"` — Sentinel value returned when a key is missing or invalid. --- ### `StringResources` (class) **Namespace:** `PedestrianAndHeadReports.Resources` **Access Modifier:** `internal` **Attributes:** `[GeneratedCode]`, `[DebuggerNonUserCode]`, `[CompilerGenerated]` An auto-generated strongly-typed resource accessor class. **Not intended for direct manual editing.** | Member | Signature | Description | |--------|-----------|-------------| | `ResourceManager` | `internal static global::System.Resources.ResourceManager ResourceManager { get; }` | Lazy-initialized cached `ResourceManager` instance pointing to `"PedestrianAndHeadReports.Resources.StringResources"` resource bundle. | | `Culture` | `internal static global::System.Globalization.CultureInfo Culture { get; set; }` | Gets or sets the current UI culture for resource lookups. When set, overrides `Thread.CurrentUICulture` for all lookups via this class. | **Resource String Properties (all `internal