### YAML Translation File Structure Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Documentation/Translations.md Example of a basic YAML file structure for English translations. Each key represents a translation string. ```yaml en: action: save: "Save" ``` -------------------------------- ### Create Virtual Setting Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Create a virtual setting which is not saved directly but computed. It can have side effects and dependencies on other settings. ```csharp MY_VIRTUAL_SETTING = new VirtualSetting( typeof(bool), value => { /* apply side-effects */ }, () => { /* compute value */ return true; } ).SetDependencies(SETTING_A, SETTING_B); ``` -------------------------------- ### Register Dolphin Setting Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Register a new Dolphin emulator setting. This requires specifying the INI file, section, key, a default value, and a validation function. ```csharp MY_DOLPHIN_SETTING = RegisterDolphin( ("GFX.ini", "Settings", "MyDolphinKey"), 0, value => (int)(value ?? -1) >= 0 ); ``` -------------------------------- ### XAML Translation Markup Extension Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Documentation/Translations.md Shows how to use the `T` markup extension in XAML to display translated text. The localization namespace must be added first. ```xml xmlns:loc="clr-namespace:WheelWizard.Localization" Text="{loc:T action.save}" ``` -------------------------------- ### Register WheelWizard Setting Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Register a new WheelWizard-specific setting. This involves providing a name, a default value, and a validation function. ```csharp MY_NEW_SETTING = RegisterWhWz( "MyNewSetting", false, value => value is bool ); ``` -------------------------------- ### C# Translation Usage Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Documentation/Translations.md Demonstrates how to use the `t()` function in C# to retrieve translated strings. Arguments can be passed for dynamic content replacement. ```csharp var text = t("action.save"); var englishText = t("en.action.save"); var message = t("snackbar_success.name_change", newName); ``` -------------------------------- ### Translation Porting Script Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Documentation/Translations.md The `port_script.py` script is used for exporting and importing translations. Exports are saved to the language folder. ```bash Resources/Languages/port_script.py ``` -------------------------------- ### Define Setting Property in ISettingsServices Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Define the interface for a new setting in the ISettingsProperties class. ```csharp Setting MY_NEW_SETTING { get; } ``` -------------------------------- ### Write Setting Value Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Write a new value to a setting using type-safe manager methods. Provide the setting identifier and the new value. ```csharp // writeing SettingsManager.Set(SettingsManager.MY_NEW_SETTING, true); ``` -------------------------------- ### Define Setting Property in SettingsManager Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Define the concrete property for the new setting in the SettingsManager class. ```csharp public Setting MY_NEW_SETTING { get; } ``` -------------------------------- ### Read Setting Value Source: https://github.com/teamwheelwizard/wheelwizard/blob/main/WheelWizard/Features/Settings/ADDING_SETTINGS.md Read the value of a setting using type-safe manager methods. Specify the expected type and the setting identifier. ```csharp // reading bool value = SettingsManager.Get(SettingsManager.MY_NEW_SETTING); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.