Close

Different images based on selected language

codicezerouno
11 years ago
#1309 Quote
Avatar
  • 26
Hello,
  we need to create sliders for each language of the site. So we need upload images for each language.

Is it possible? If yes, how can we do it?

Thanks.

Boyko
11 years ago
#1314 Quote
Avatar
  • Moderator
  • 1570
codicezerouno wrote:
Hello,
  we need to create sliders for each language of the site. So we need upload images for each language.

Is it possible? If yes, how can we do it?

Thanks.



Hi codicezerouno,

There is no way to do this out of the box with the current version of the Sliders.
The workaround for this is to use Manual integration by SystemName for the sliders and name your sliders by including the language culture in them.
For example if you have 2 languages - English and Italian.
Then you need to create two sliders and name them Slider-en-US and Slider-it-IT. Then for Slider-en-US upload images with English text and for Slider-it-IT upload images with Italian text. Then you need to integrate them Manually by including the current language culture in the SystemName parameter.


@{
        
            var currentLanguageCulture = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Core.IWorkContext>().WorkingLanguage.LanguageCulture;
        }
        @Html.Action("Slider", "AnywhereSliders", new { systemName = "Slider-" + currentLanguageCulture })


Then simply add the code snippet above to the place where you want your slider to appear in the view file.
Now when you change the language to be Italian it will show with name Slider-it-IT and show the Italian images.

About manual integration by systemName you can read point 2.1 in the online documentation:
http://www.nop-templates.com/Help/NopAnywhereSliders/Version_2_6/lessons/Integration.html

You idea to have a way to mark a Slider for a given language from the Administration is great. You can suggest it in our UserVoice portal and let others vote for it.

Best Regards,
Nop-Templates Support Team
Regards,
Nop-Templates.com Team
[email protected]
11 years ago
#2436 Quote
Avatar
  • 6
I buy Jewerly Theme 2.8. I need to have different images for every language. I try to find code that you write above but i don't be able to find it.

Is it possible to read image from a topic? How?
Boyko
11 years ago
#2437 Quote
Avatar
  • Moderator
  • 1570
[email protected] wrote:
I buy Jewerly Theme 2.8. I need to have different images for every language. I try to find code that you write above but i don't be able to find it.

Is it possible to read image from a topic? How?


Hi Andrea,

Are you talking about the images in the Anywhere Sliders or in general?
There is no way to get images from a topic in nopCommerce.
If you are talking about the images in the Anywhere Sliders then you need to create two Sliders from the Administration and each of them to have images for the specific language.
Then you need to use the code above(simply copy and paste it) and add it where you want to show the Slider. Please let us know where you want to add the Slider and we will tell you in which file to add the code above.

Thanks
Regards,
Nop-Templates.com Team
BlueMed
9 years ago
#8337 Quote
Avatar
  • 50
Boyko wrote:
I buy Jewerly Theme 2.8. I need to have different images for every language. I try to find code that you write above but i don't be able to find it.

Is it possible to read image from a topic? How?

Hi Andrea,

Are you talking about the images in the Anywhere Sliders or in general?
There is no way to get images from a topic in nopCommerce.
If you are talking about the images in the Anywhere Sliders then you need to create two Sliders from the Administration and each of them to have images for the specific language.
Then you need to use the code above(simply copy and paste it) and add it where you want to show the Slider. Please let us know where you want to add the Slider and we will tell you in which file to add the code above.

Thanks


Dear Support Team,

My site support 2 languages French and English.I want to add the language based slider through Nop Anywhere slider.But I cannot, .How can i achieve this.How to add custom conditions on Nop Anywhere slider.Kindly help me on this.We are using Nop commerce 3.4 with Traction Theme.

Regards,
Ela
BlueMed Dev Team
Boyko
9 years ago
#8342 Quote
Avatar
  • Moderator
  • 1570
BlueMed wrote:

My site support 2 languages French and English.I want to add the language based slider through Nop Anywhere slider.But I cannot, .How can i achieve this.How to add custom conditions on Nop Anywhere slider.Kindly help me on this.We are using Nop commerce 3.4 with Traction Theme.

Regards,
Ela
BlueMed Dev Team


Hi Ela,

When you create a new Slider you can select the Language for which this Slider will appear from the Language dropdown. By default it is selected All, which means it will be shown for all languages but you can change it.
Regards,
Nop-Templates.com Team
BlueMed
9 years ago
#8354 Quote
Avatar
  • 50
Boyko wrote:

My site support 2 languages French and English.I want to add the language based slider through Nop Anywhere slider.But I cannot, .How can i achieve this.How to add custom conditions on Nop Anywhere slider.Kindly help me on this.We are using Nop commerce 3.4 with Traction Theme.

Regards,
Ela
BlueMed Dev Team

Hi Ela,

When you create a new Slider you can select the Language for which this Slider will appear from the Language dropdown. By default it is selected All, which means it will be shown for all languages but you can change it.
.

Dear Support Team,

Sorry for delayed response. Thank you very much for your timely help.

Regards,
Ela