0
deltavision created
Hi,
v11.2.1 MVC .NET Core
We wish to update the lang attribute of the html tag, based on the selected language. But can not figure out where to do this.
It should be set when entering the page and when changing the language
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
2 Answer(s)
-
0
Hi,
You can inject
ILanguageManagerto related _Layout.cshtml file and get current language usingLanguageManager.CurrentLanguage.@inject ILanguageManager LanguageManager <html lang="@LanguageManager.CurrentLanguage.Name"> <!-- OTHER CODE BLOCKS --> </html>Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Hi @ismcagdas,
works perfectly - thank you
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)