Skip to content

paramaters work as follows  #83

@suatsuphi

Description

@suatsuphi

return new LocalizedString(name, String.Format(localizedString.Value, arguments), localizedString.ResourceNotFound);

parameters work as follows

using System.Linq;
public LocalizedString this[string name, params object[] arguments]
        {
            get
            {
                var localizedString = this[name];
                return new LocalizedString(name, String.Format(localizedString.Value, arguments.Select(x => x.ToString()).ToArray()), localizedString.ResourceNotFound);
            }
        }
new LocalizationRecord(){ Key="RequiredError", ResourceKey="global", Text="The {0} field is required.", LocalizationCulture="en-GB" },
new LocalizationRecord(){ Key="Name", ResourceKey="global", Text="Name", LocalizationCulture="en-GB" },

[Required(ErrorMessage = "RequiredError")]
[Display(Name = "Name")] 
public string Name { get; set; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions