public void SetLocalisedName(Locale locale, string name) { var localisedName = this.LocalisedNames.FirstOrDefault(localizedText => localizedText.Locale.Equals(locale)); if (localisedName == null) { localisedName = new LocalisedTextBuilder(this.Strategy.Session).WithText(name).WithLocale(locale).Build(); this.AddLocalisedName(localisedName); } else { localisedName.Text = name; } }
public string GetLocalisedName(Locale locale) { var localisedName = this.LocalisedNames.FirstOrDefault(localizedText => localizedText.Locale.Equals(locale)); return localisedName != null ? localisedName.Text : this.Name; }
public static string ToString(this decimal dec, Locale locale) { var cultureInfo = locale != null ? locale.CultureInfo : null; return dec.ToString(cultureInfo); }