Skip to content

Commit bca1d09

Browse files
committed
Fixed #23.
1 parent f160cbd commit bca1d09

File tree

8 files changed

+145
-77
lines changed

8 files changed

+145
-77
lines changed

src/AbpCompanyName.AbpProjectName.WebMpa/AbpCompanyName.AbpProjectName.WebMpa.csproj

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@
5050
<HintPath>..\packages\Abp.AutoMapper.0.7.7.0\lib\net452\Abp.AutoMapper.dll</HintPath>
5151
<Private>True</Private>
5252
</Reference>
53+
<Reference Include="Abp.EntityFramework, Version=0.7.7.0, Culture=neutral, processorArchitecture=MSIL">
54+
<HintPath>..\packages\Abp.EntityFramework.0.7.7.0\lib\net452\Abp.EntityFramework.dll</HintPath>
55+
<Private>True</Private>
56+
</Reference>
5357
<Reference Include="Abp.Web, Version=0.7.7.0, Culture=neutral, processorArchitecture=MSIL">
5458
<HintPath>..\packages\Abp.Web.0.7.7.0\lib\net452\Abp.Web.dll</HintPath>
5559
<Private>True</Private>
@@ -62,6 +66,14 @@
6266
<HintPath>..\packages\Abp.Web.Mvc.0.7.7.0\lib\net452\Abp.Web.Mvc.dll</HintPath>
6367
<Private>True</Private>
6468
</Reference>
69+
<Reference Include="Abp.Zero, Version=0.7.7.0, Culture=neutral, processorArchitecture=MSIL">
70+
<HintPath>..\packages\Abp.Zero.0.7.7.0\lib\net452\Abp.Zero.dll</HintPath>
71+
<Private>True</Private>
72+
</Reference>
73+
<Reference Include="Abp.Zero.EntityFramework, Version=0.7.7.0, Culture=neutral, processorArchitecture=MSIL">
74+
<HintPath>..\packages\Abp.Zero.EntityFramework.0.7.7.0\lib\net452\Abp.Zero.EntityFramework.dll</HintPath>
75+
<Private>True</Private>
76+
</Reference>
6577
<Reference Include="Antlr3.Runtime, Version=3.5.0.2, Culture=neutral, PublicKeyToken=eb42632606e9261f, processorArchitecture=MSIL">
6678
<SpecificVersion>False</SpecificVersion>
6779
<HintPath>..\packages\Antlr.3.5.0.2\lib\Antlr3.Runtime.dll</HintPath>
@@ -102,6 +114,10 @@
102114
<HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
103115
<Private>True</Private>
104116
</Reference>
117+
<Reference Include="Microsoft.AspNet.Identity.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
118+
<HintPath>..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
119+
<Private>True</Private>
120+
</Reference>
105121
<Reference Include="Microsoft.CSharp" />
106122
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
107123
<Private>True</Private>
@@ -259,13 +275,6 @@
259275
<Content Include="favicon.ico" />
260276
<Content Include="Global.asax" />
261277
<Content Include="js\main.js" />
262-
<Content Include="Localization\AbpProjectName\AbpProjectName-zh-CN.xml" />
263-
<Content Include="Localization\AbpProjectName\AbpProjectName.tr.xml">
264-
<SubType>Designer</SubType>
265-
</Content>
266-
<Content Include="Localization\AbpProjectName\AbpProjectName.xml">
267-
<SubType>Designer</SubType>
268-
</Content>
269278
<Content Include="css\main.less" />
270279
<Content Include="css\main.css.map">
271280
<DependentUpon>main.css</DependentUpon>

src/AbpCompanyName.AbpProjectName.WebMpa/App_Start/AbpProjectNameWebModule.cs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using System.Reflection;
2-
using System.Web;
32
using System.Web.Mvc;
43
using System.Web.Optimization;
54
using System.Web.Routing;
6-
using Abp.Localization;
7-
using Abp.Localization.Dictionaries;
8-
using Abp.Localization.Dictionaries.Xml;
5+
using Abp.Zero.Configuration;
96
using Abp.Modules;
107
using Abp.Web.Mvc;
118
using AbpCompanyName.AbpProjectName.Api;
@@ -21,20 +18,8 @@ public class AbpProjectNameWebModule : AbpModule
2118
{
2219
public override void PreInitialize()
2320
{
24-
//Add/remove languages for your application
25-
Configuration.Localization.Languages.Add(new LanguageInfo("en", "English", "famfamfam-flag-england", true));
26-
Configuration.Localization.Languages.Add(new LanguageInfo("tr", "Türkçe", "famfamfam-flag-tr"));
27-
Configuration.Localization.Languages.Add(new LanguageInfo("zh-CN", "简体中文", "famfamfam-flag-cn"));
28-
29-
//Add/remove localization sources here
30-
Configuration.Localization.Sources.Add(
31-
new DictionaryBasedLocalizationSource(
32-
AbpProjectNameConsts.LocalizationSourceName,
33-
new XmlFileLocalizationDictionaryProvider(
34-
HttpContext.Current.Server.MapPath("~/Localization/AbpProjectName")
35-
)
36-
)
37-
);
21+
//Enable database based localization
22+
Configuration.Modules.Zero().LanguageManagement.EnableDbLocalization();
3823

3924
//Configure navigation/menu
4025
Configuration.Navigation.Providers.Add<AbpProjectNameNavigationProvider>();

src/AbpCompanyName.AbpProjectName.WebMpa/Localization/AbpProjectName/AbpProjectName-zh-CN.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/AbpCompanyName.AbpProjectName.WebMpa/Localization/AbpProjectName/AbpProjectName.tr.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/AbpCompanyName.AbpProjectName.WebMpa/Localization/AbpProjectName/AbpProjectName.xml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)