/// <summary> /// The localized name of the parameter in Revit (if it exists). /// </summary> /// <param name="locale">The language.</param> /// <returns>The localized name, or null if it does not exist.</returns> public string LocalizedRevitParameterName(LanguageType locale) { if (LocalizedRevitParameterNames != null) { if (LocalizedRevitParameterNames.TryGetValue(locale, out string localizedName)) { return(localizedName); } } return(null); }
/// <summary> /// Adds a localized name for the entry. /// </summary> /// <param name="locale">The language.</param> /// <param name="localizedName">The name for that language.</param> public void AddLocalizedParameterName(LanguageType locale, string localizedName) { if (LocalizedRevitParameterNames == null) { LocalizedRevitParameterNames = new Dictionary <LanguageType, string>(); } if (LocalizedRevitParameterNames.ContainsKey(locale)) { throw new ArgumentException("Locale value already defined."); } LocalizedRevitParameterNames[locale] = localizedName; }