Skip to content

Localization - async and CallerArgumentExpression #60156

@cx-seibel

Description

@cx-seibel

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

Using async methods and provide arguments like ILogger does

Describe the solution you'd like

Hi,
I just wonder why IStringLocalizer or IStringLocalizer< T > does not support async methods since getting translations is usually from filesystem or database and can be async.
But more importent, it would be great using CallerArgumentExpression for arguements.
Instead of providing a string like "My name is {0} and my age is {1}"
we could use "My name is {Name} and my age is {Age}" like Ilogger does.

Thank you all

Additional context

(https://youtu.be/MHIheQ2_Yb4?t=324)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesfeature-localization

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions