Closes #437. Added localization resources and registered.

pull/473/head
Alper Ebicoglu 6 years ago
parent e7ee271ee3
commit e67939357c

@ -9,6 +9,16 @@
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<None Remove="Volo\Docs\Localization\Domain\en.json" />
<None Remove="Volo\Docs\Localization\Domain\tr.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Volo\Docs\Localization\Domain\en.json" />
<EmbeddedResource Include="Volo\Docs\Localization\Domain\tr.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Docs.Domain.Shared\Volo.Docs.Domain.Shared.csproj" />
<ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Ddd.Domain\Volo.Abp.Ddd.Domain.csproj" />

@ -1,5 +1,9 @@
using Volo.Abp.Domain;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Domain;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
using Volo.Docs.Localization;
namespace Volo.Docs
{
@ -9,6 +13,17 @@ namespace Volo.Docs
)]
public class DocsDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<DocsDomainModule>();
});
context.Services.Configure<AbpLocalizationOptions>(options =>
{
options.Resources.Get<DocsResource>().AddVirtualJson("/Volo/Docs/Localization/Domain");
});
}
}
}

@ -0,0 +1,9 @@
{
"culture": "en",
"texts": {
"Documents": "Documents",
"BackToWebsite": "Back to website",
"Version": "Version"
}
}

@ -0,0 +1,9 @@
{
"culture": "tr",
"texts": {
"Documents": "Dökümanlar",
"BackToWebsite": "Ana sayafaya dön",
"Version": "Versiyon"
}
}

@ -1,8 +1,11 @@
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@using Volo.Docs
@using Volo.Docs.Localization
@using Volo.Docs.Pages.Documents.Project
@inject IThemeManager ThemeManager
@inject IHtmlLocalizer<DocsResource> L
@model IndexModel
@{
ViewBag.FluidLayout = true;
@ -48,7 +51,7 @@
<a class="navbar-brand w-100" href="/">
@Model.ProjectName<br>
<strong class="display-block">
Documents
@L["Documents"]
</strong>
</a>
}
@ -57,7 +60,7 @@
{
<a href="@Model.Document.Project.MainWebsiteUrl" class="go-back-site">
<i class="fa fa-chevron-left"></i>
Back to Website
@L["BackToWebsite"]
</a>
}
@ -74,7 +77,6 @@
<div class="docs-tree-list">
<div class="docs-filter">
<input class="form-control" type="search" placeholder="Filter topics" aria-label="Filter">
<span class="my-2 filter-icon my-sm-0">
<i class="fa fa-filter"></i>
</span>
@ -86,7 +88,7 @@
<div class="version-select">
<div class="input-group">
<div class="input-group-prepend">
<label class="input-group-text">Version</label>
<label class="input-group-text">@L["Version"]</label>
</div>
<select asp-items="Model.VersionSelectItems" class="form-control" onchange="window.location.replace(this.value)"></select>

Loading…
Cancel
Save