
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
github.com/NetCoreStack/Localization
Online Demo Page: http://netcorestack-localization-test.herokuapp.com/
Latest release on Nuget: https://www.nuget.org/packages/NetCoreStack.Localization
Docker Image: https://hub.docker.com/r/tahaipek/netcorestack-localization-test-hosting
PM> docker pull tahaipek/netcorestack-localization-test-hosting
PM> docker run -d -p 5003:80 netcorestack-localization-test-hosting
PM> Install-Package NetCoreStack.Localization
Configuration settings in AppSettings.json
:
{
"DbSettings": {
"SqlConnectionString": "Server=.;Database=LocalizationTest;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"LocalizationSettings": {
"UseDefaultLanguageWhenValueIsNull": true
}
}
public void ConfigureServices(IServiceCollection services)
{
services.AddNetCoreStackMvc(options => { options.AppName = "NetCoreStack Localization"; });
services.AddNetCoreStackLocalization(Configuration);
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UseNetCoreStackMvc();
app.UseNetCoreStackLocalization();
}
<head>
<!-- Optional: The resources defined javascript. => "window.culture.resource" -->
<netcorestack-javascriptregistrar></netcorestack-javascriptregistrar>
<!--
Optional:
- If you want cookies to be set by JavaScript, you should use this.
- If you don't want cookies to be set by JavaScript, remove this line. It will automatically redirect to Controller Action.
-->
<netcorestack-languageSelector-scripts></netcorestack-languageSelector-scripts>
</head>
<body>
<!--
Required: Language Selector Combobox
Optional:
- If you want cookies to be set by JavaScript, you should set "set-cookie-with-java-script" property.
- If you don't want cookies to be set by JavaScript, the application sets it through Controller Action.
-->
<netcorestack-languageSelector name="culture" set-cookie-with-java-script="true"></netcorestack-languageSelector>
@Localizer["Logo_Description"]
</body>
public class HomeController : Controller
{
private readonly IStringLocalizer _stringLocalizer;
public HomeController(IStringLocalizer stringLocalizer)
{
_stringLocalizer = stringLocalizer;
}
public IActionResult About()
{
ViewData["Message"] = _stringLocalizer["AboutPageDescription"];
return View();
}
}
How To Use | Forms & Validations |
---|---|
![]() | ![]() |
Component Api | Client-Side Localization |
---|---|
![]() | ![]() |
Exception Localization | AjaxException Localization |
---|---|
![]() | ![]() |
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.