public Boolean AddSupportedCulture([NotNull] CultureInfo info, [CanBeNull] ISubLocalization config) { if (info is null) { throw new ArgumentNullException(nameof(info)); } if (!Supported.TryAdd(info, config)) { return(false); } SupportedLanguagesChanged?.Invoke(); return(true); }
public Boolean RemoveSupportedCulture([NotNull] CultureInfo info) { if (info is null) { throw new ArgumentNullException(nameof(info)); } if (info.LCID == CultureUtils.Default || info.LCID == Default.LCID) { return(false); } if (!Supported.Remove(info)) { return(false); } SupportedLanguagesChanged?.Invoke(); return(true); }