zHaytam / SmartBreadcrumbs

A utility library for ASP.NET Core (both MVC and Razor Pages) websites to easily add and customize breadcrumbs.
https://blog.zhaytam.com/2018/06/24/asp-net-core-using-smartbreadcrumbs/
MIT License
161 stars 77 forks source link

add localizations? #41

Closed icesasoftcorp closed 5 years ago

icesasoftcorp commented 5 years ago

how can i add Breadcrumb translations?

zHaytam commented 5 years ago

It is not possible at the moment, PRs are welcome though, it shouldn't be that hard to implement. If I get the time for it I'll do it.

Duplicate of #28

markchipman commented 4 years ago

One thought I have to accomplish this, although kludgey, would be to have the route for each endpoint have language specific routing (ie "/en/account" vs "/es/cuenta", etc.) and have the breadcrumb use them in conjunction with the correct language translations).

However it seems to me that really, the most direct (.net) way would be to add an additional optional argument to the breadcrumb attribute to pass in the name of the resource resolver. That way your doing translations using the same key, but getting the correct translated value back.