eadameg wrote:No. Multistore is not supported. Only one web application is allowed now
I've done it....with nop 2.10
Thanks for support....
Hi Dharmik:
Can you share how did you do it?
1)Create a New language with same Language culture Like English which is default
2)Export View string resources from English to your any directory and import it to new language.
3)Modify your Web.config of Nop.web
Line no:43
<appSettings>
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="UseSSL" value="false" />
<add key="SharedSSLUrl" value="" />
<add key="NonSharedSSLUrl" value="" />
<add key="RouteDebugger:Enabled" value="false" />
<add key="GoogleMerchantID" value="" />
<add key="GoogleMerchantKey" value="" />
<add key="GoogleEnvironment" value="Sandbox" />
<add key="GoogleAuthenticateCallback" value="True" />
<add key="langId" value="3" /> <!--Add this key to pass a language id ....-->
</appSettings>
Now see your new language id from database in Language table and pass in web.config
4)just modify your Home controller of Nop.web
using System;
using System.Linq;
using System.Web.Mvc;
using Nop.Core;
using Nop.Core.Domain;
using Nop.Core.Domain.Blogs;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Common;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Forums;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Messages;
using Nop.Core.Domain.Orders;
using Nop.Core.Domain.Tax;
using Nop.Services.Catalog;
using Nop.Services.Customers;
using Nop.Services.Directory;
using Nop.Services.Forums;
using Nop.Services.Localization;
using Nop.Services.Messages;
using Nop.Services.Orders;
using Nop.Services.Security;
using Nop.Services.Seo;
using Nop.Services.Topics;
using Nop.Web.Extensions;
using Nop.Web.Framework.Controllers;
using Nop.Web.Framework.Localization;
using Nop.Web.Framework.Themes;
using Nop.Web.Models.Common;
using System.Web.Configuration;
namespace Nop.Web.Controllers
{
public class HomeController : BaseNopController
{
private readonly ILanguageService _languageService;
private readonly ILocalizationService _localizationService;
private readonly IWorkContext _workContext;
private readonly ICustomerService _customerService;
private readonly IPermissionService _permissionService;
private readonly CustomerSettings _customerSettings;
private readonly CommonSettings _commonSettings;
private readonly LocalizationSettings _localizationSettings;
public HomeController(
ITopicService topicService,
ILanguageService languageService,
ILocalizationService localizationService,
IWorkContext workContext,
ICustomerService customerService,
IPermissionService permissionService,
CustomerSettings customerSettings,
StoreInformationSettings storeInformationSettings,
CommonSettings commonSettings,
LocalizationSettings localizationSettings)
{
this._languageService = languageService;
this._localizationService = localizationService;
this._workContext = workContext;
this._customerService = customerService;
this._permissionService = permissionService;
this._customerSettings = customerSettings;
this._commonSettings = commonSettings;
this._localizationSettings = localizationSettings;
}
public ActionResult Index()
{
int lid = Convert.ToInt32(WebConfigurationManager.AppSettings["langid"]);
var language = _languageService.GetLanguageById(lid);
if (language != null && language.Published)
{
_workContext.WorkingLanguage = language;
}
if (_localizationSettings.SeoFriendlyUrlsForLanguagesEnabled)
{
string applicationPath = HttpContext.Request.ApplicationPath;
if (HttpContext.Request.UrlReferrer != null)
{
string redirectUrl = HttpContext.Request.UrlReferrer.PathAndQuery;
if (redirectUrl.IsLocalizedUrl(applicationPath, true))
{
//already localized URL
redirectUrl = redirectUrl.RemoveLocalizedPathFromRawUrl(applicationPath);
}
redirectUrl = redirectUrl.AddLocalizedPathToRawUrl(applicationPath, _workContext.WorkingLanguage);
return Redirect(redirectUrl);
}
else
{
string redirectUrl = Url.Action("Index", "Home");
redirectUrl = redirectUrl.AddLocalizedPathToRawUrl(applicationPath, _workContext.WorkingLanguage);
return Redirect(redirectUrl);
}
}
else
{
if (HttpContext.Request.UrlReferrer != null)
{
//return Redirect(HttpContext.Request.UrlReferrer.PathAndQuery);
}
else
{
//return RedirectToAction("Index", "Home");
}
}
return View();
}
}
}