Info
Version: | 0.6.0 |
Author(s): | AdmiringWorm |
Last Update: | Friday, March 1, 2019 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | https://github.com/WormieCorp/Localization.AspNetCore.TagHelpers |
NuGet Url: | https://www.nuget.org/packages/Localization.AspNetCore.TagHelpers |
Install
Install-Package Localization.AspNetCore.TagHelpers
dotnet add package Localization.AspNetCore.TagHelpers
paket add Localization.AspNetCore.TagHelpers
Localization.AspNetCore.TagHelpers Download (Unzip the "nupkg" after downloading)
Dependencies
- Microsoft.AspNetCore.Mvc.Localization(>= 2.2.0)
- Microsoft.AspNetCore.Razor.Runtime(>= 2.2.0)
Tags
Usage
To use these tag helpers add the following to your `_ViewImports.cshtml` file
@addTagHelper *, Localization.AspNetCore.TagHelpers
The package currently supports three tag helpers with the following usage cases:
Usage with the tag name `<localize>Text to localize</localize>`
Usage with a html attribute `<span localize>Text to localize</localize>`
Ability to localize html attribute using the following: `<span localize-title='I'm the title to localize'>This won't</span>`
Please see the documentation for all available attributes and their usage:
https://wormiecorp.github.io/Localization.AspNetCore.TagHelpers/docs/helpers.