I would like some idea on how to integrate an image to the footer using the selected language. Example if English is selected i want to show an image in my theme folder (Themes\Test\Content\Images) ENTEST.png and if Spanish is selected i want to see ESTEST.png. Thank you
This is how i am doing it now, but i dont want to search for a Text, i rather look up the language ID instead. I am missing the correct code to use in MVC, i am a newby to MVC !
<div> @if (T("Account.MyAccount").Text == "My account") { <img src="@Url.Content("~/Themes/NicoleHouse/Content/images/footer/footerEN.jpg")" alt="" /> } @if (T("Account.MyAccount").Text == "account.myaccount") { <img src="@Url.Content("~/Themes/NicoleHouse/Content/images/footer/footerES.jpg")" alt="" /> } </div> Whats in bold is what does the trick looking up a specific text.
Hi, I have a similar requirement but in 3.8. If I follow this, in the view I get the compiler error of WorkContext not being in the current context. I have tried referencing a few libraries, but not having any joy. Can you help me apply this in 3.8 please?
OK, so some progress in the right direction hopefully. I have added logic to the controller to be more correct. This appears to work, but _workContext.WorkingLanguage.UniqueSeoCode is always Null. Anyone any clues.
Steve.
using System.Web.Mvc; using Nop.Core; using Nop.Core.Caching; using Nop.Services.Configuration; using Nop.Services.Localization; using Nop.Services.Media; using Nop.Services.Stores; using Nop.Web.Framework.Controllers;