-
-
Notifications
You must be signed in to change notification settings - Fork 8
SharedCultureLocalizer
Ziya Mollamahmut edited this page Mar 19, 2020
·
3 revisions
The other option to localize views is using the built-in ISharedCultureLocalizer
- Inject
ISharedCultureLocalizer
into the view:
@using LazZiya.ExpressLocalization
@inject ISharedCultureLocalizer _loc
- call localization function to get localized strings in views:
<h1 class="display-4">@_loc["Welcome"]</h1>
But when it comes to localize long strings with html tags this approach become unfriendly. That's why the recommended localization approach is using Localize TagHelper
.
4.0