예제 #1
0
파일: Currency.cs 프로젝트: whesius/allors
 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;
     }
 }
예제 #2
0
파일: Currency.cs 프로젝트: whesius/allors
 public string GetLocalisedName(Locale locale)
 {
     var localisedName = this.LocalisedNames.FirstOrDefault(localizedText => localizedText.Locale.Equals(locale));
     return localisedName != null ? localisedName.Text : this.Name;
 }
예제 #3
0
 public static string ToString(this decimal dec, Locale locale)
 {
     var cultureInfo = locale != null ? locale.CultureInfo : null;
     return dec.ToString(cultureInfo);
 }