Add LanguageSwitcher component

This commit is contained in:
hishamco
2020-12-02 01:52:46 +03:00
parent c67e893b6e
commit c4d1b16abb
5 changed files with 42 additions and 2 deletions

View File

@ -48,6 +48,12 @@
@if (Configuration.GetSection("Runtime").Value == "WebAssembly")
{
<script src="_framework/blazor.webassembly.js"></script>
<script>
window.oqtaneCulture = {
get: () => window.localStorage['OqtaneCulture'],
set: (value) => window.localStorage['OqtaneCulture'] = value
};
</script>
}
else
{

View File

@ -127,6 +127,7 @@ namespace Oqtane
services.AddScoped<ISiteTemplateService, SiteTemplateService>();
services.AddScoped<ISqlService, SqlService>();
services.AddScoped<ISystemService, SystemService>();
services.AddScoped<ILocalizationService, LocalizationService>();
services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();