private void SetLocalization(JobPositionViewModel item, bool editing) { if (item != null) { if (item.Remote || string.IsNullOrWhiteSpace(item.Location)) { item.Location = SharedLocalizer["Planet Earth"]; } DisplayAttribute displayWorkType = item.WorkType.GetAttributeOfType <DisplayAttribute>(); Microsoft.Extensions.Localization.LocalizedString localizedWorkType = SharedLocalizer[displayWorkType != null ? displayWorkType.Name : item.WorkType.ToString()]; item.Title = SharedLocalizer["{0} at {1}", localizedWorkType, item.Location]; DisplayAttribute displayStatus = item.Status.GetAttributeOfType <DisplayAttribute>(); item.StatusLocalized = SharedLocalizer[displayStatus != null ? displayStatus.Name : item.WorkType.ToString()]; if ((item.Id != Guid.Empty && !editing && (!string.IsNullOrWhiteSpace(item.CompanyName) && item.CompanyName.Equals(JobPositionBenefit.NotInformed.ToDisplayName()))) || string.IsNullOrWhiteSpace(item.CompanyName)) { item.CompanyName = SharedLocalizer[JobPositionBenefit.NotInformed.ToDisplayName()]; } } }
protected virtual Microsoft.AspNetCore.Mvc.Localization.LocalizedHtmlString ToHtmlString(Microsoft.Extensions.Localization.LocalizedString result, object[] arguments) { throw null; }
public static string Format(this Microsoft.Extensions.Localization.LocalizedString localizedString, params object[] args) { return(string.Format(localizedString, args)); }