diff --git a/Duplicati/Library/Main/LocaleChange.cs b/Duplicati/Library/Main/LocaleChange.cs index 5d3952b30..402d240e1 100644 --- a/Duplicati/Library/Main/LocaleChange.cs +++ b/Duplicati/Library/Main/LocaleChange.cs @@ -6,6 +6,10 @@ using System.Threading.Tasks; namespace Duplicati.Library.Main { + /// + /// Changes the current locale for all threads and for log messages in the current context. + /// When disposed the changes are reset. + /// public class LocaleChange : IDisposable { private static readonly string LOGTAG = Logging.Log.LogTagFromType(); @@ -16,6 +20,9 @@ namespace Duplicati.Library.Main private IDisposable m_localizationContext = null; + /// + /// Change locale if newLocale is not null + /// public LocaleChange(System.Globalization.CultureInfo newLocale) { if (newLocale == null) @@ -39,10 +46,24 @@ namespace Duplicati.Library.Main } } + /// + /// Change locale if ForcedLocale is specified in options + /// + /// Command line options + /// + /// Thrown if specified locale was not found. + /// public LocaleChange(Options options) : this(options.HasForcedLocale ? options.ForcedLocale : null) { } + /// + /// Change locale if 'force-locale' is specified in options dictionary + /// + /// Command line options + /// + /// Thrown if specified locale was not found. + /// public LocaleChange(Dictionary options) : this(new Options(options)) {