# Localization ## General structure We use the .NET default approach for the localization. Each DLL which needs localized strings, adds the necessary resource files. The used language is determined by CultureInfo.CurrentUICulture. ## Resource Files Structure The application has separate resource files for different layers and supports multiple languages: **WPF UI Layer:** - **German (default)**: `src/centron/Centron.WPF.UI/Resources/LocalizedStrings.resx` - **English**: `src/centron/Centron.WPF.UI/Resources/LocalizedStrings.en.resx` **Business Logic Layer:** - **German (default)**: `src/backend/Centron.BL/Resources/LocalizedStrings.resx` - **English**: `src/backend/Centron.BL/Resources/LocalizedStrings.en.resx` ### Language Support - **Default Language**: German - stored in the base resource files (`LocalizedStrings.resx`) - **Additional Languages**: English - stored in language-specific resource files (`LocalizedStrings.en.resx`) - **Language Selection**: Determined by `CultureInfo.CurrentUICulture` Each resource file contains the same keys but with text in the respective language. When creating new localized strings, you must provide translations for both German and English. **Example of the same key in different languages:** ``` German (LocalizedStrings.resx): LoginDialogView_Benutzername = "Benutzername" English (LocalizedStrings.en.resx): LoginDialogView_Benutzername = "Username" ``` ## Usage Examples ### XAML Usage In XAML files, localized strings are accessed using static property syntax with the appropriate namespace declaration. **Namespace Declaration:** Add this to your XAML file's root element: ```xml xmlns:properties="clr-namespace:CentronSoftware.Centron.WPF.UI.Resources" ``` **Usage in XAML:** ```xml