// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. namespace osu.Framework.Localisation { /// /// A set of parameters that control the way strings are localised. /// public class LocalisationParameters { public static readonly LocalisationParameters DEFAULT = new LocalisationParameters(null, false); /// /// The to be used for string lookups and culture-specific formatting. /// public readonly ILocalisationStore? Store; /// /// Whether to prefer the "original" script of s. /// public readonly bool PreferOriginalScript; /// /// Creates a new instance of based off another . /// /// The to copy values from. protected LocalisationParameters(LocalisationParameters parameters) : this(parameters.Store, parameters.PreferOriginalScript) { } /// /// Creates a new instance of . /// /// The to be used for string lookups and culture-specific formatting. /// Whether to prefer the "original" script of s. public LocalisationParameters(ILocalisationStore? store, bool preferOriginalScript) { Store = store; PreferOriginalScript = preferOriginalScript; } /// /// Creates new from this with the provided fields changed. /// /// New based on this . public LocalisationParameters With(ILocalisationStore? store = null, bool? preferOriginalScript = null) => new LocalisationParameters( store ?? Store, preferOriginalScript ?? PreferOriginalScript ); } }