/* * SPDX-License-Identifier: AGPL-3.0-or-later * Copyright (C) 2025 Sergej Görzen * This file is part of OmiLAXR. */ using OmiLAXR.Types; using UnityEngine; namespace OmiLAXR.Context { /// /// Learning context component that defines the primary language for the current scenario. /// Provides language information for internationalization and localization of analytics statements. /// Implements singleton pattern to ensure consistent language context across the application. /// [AddComponentMenu("OmiLAXR / Scenario Context / Scenario Language")] [DisallowMultipleComponent] public sealed class ScenarioLanguage : LearningContext { /// /// Static reference to the singleton instance. /// private static ScenarioLanguage _instance; /// /// Singleton accessor for the scenario language instance. /// Ensures only one language context exists per scene. /// public static ScenarioLanguage Instance => GetInstance(ref _instance); /// /// The primary language setting for this scenario. /// Defaults to English (en) and can be configured in the inspector. /// Used for localizing statement content and metadata. /// public Languages language = Languages.en; } }