Hi. We are working on a site (version 5.0.2860.0
) and we have been tasked with adding a new language (culture: en-GB) I have added this in the back end and can add and edit the "translated" pages without issue.
We have created some custom widgets that take advantage of the module builder feature to store and manage the data on the back end. For instance we have a carousel slide module that accepts an image and a title and link. I created a custom widget that queries all of the published slides and renders them appropriately this all works great in the default language of English (en).
Here is the code used to query the slides
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
Type homepageCarouselSlideType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.HomepageCarousel.HomepageCarouselSlide");
// Get the collection of Homepage Carousel Slide items where the slides have been published and order them by priority
var SlideCollection = dynamicModuleManager.GetDataItems(homepageCarouselSlideType).Where(i => i.Status == ContentLifecycleStatus.Live && i.Visible == true).OrderBy("Priority");
This is all pretty straightforward however I need to be able to save slides for different languages. I'm certain that I will need to modify the above code for retrieving my slides for the current culture only...or I am completely off base.
1. Do I need to create some sort of language selector in my module in the backend such as a dropdown allowing the user to select which culture to apply the slide to or does Sitefinity have some way of determining this automatically? Admittedly, I'm new to localization in .NET/Sitefinity and I am trying to get my head around the basic concepts here.
Thank you in advance.