How to Localize the Pager pagingSummaryFormat

So, this one is making me feel dumb..I'm trying to Localize the text for the pager but having no luck.

Obviously, if I do this, the pager no longer interpolates but just displays the localized string

    //private string pagingSummaryFormat = "Displaying page {0} of {1} (total {2} records)";


   // Error  A field initializer cannot reference the non-static field, method, or property
   //private string pagingSummaryFormat = $"{Localizer["Displaying page"]} {0} {Localizer["of"]} {1} ({Localizer["total"]} {2} {Localizer["items"]})";

    //Just display as string
    private string pagingSummaryFormat;
    protected override async Task OnInitializedAsync()
    {
        pagingSummaryFormat = $"{Localizer["Displaying page"]} {0} {Localizer["of"]} {1} ({Localizer["total"]} {2} {Localizer["items"]})";

    }

Hi @TimCadieux,

As you know {} is a special construct inside $"" strings. It is used to interpolate values. You probably need to escape {0} to {{0}}.

Wow, yeah that did it...like I said...now I feel dumb.. :slight_smile:

thank you