diff --git a/src/Umbraco.Web/Editors/TourController.cs b/src/Umbraco.Web/Editors/TourController.cs index 98a01f2c6e..5fb54ddd32 100644 --- a/src/Umbraco.Web/Editors/TourController.cs +++ b/src/Umbraco.Web/Editors/TourController.cs @@ -118,13 +118,18 @@ namespace Umbraco.Web.Editors var contents = File.ReadAllText(tourFile); var tours = JsonConvert.DeserializeObject(contents); + var backOfficeTours = tours.Where(x => + aliasFilters.Count == 0 || aliasFilters.All(filter => filter.IsMatch(x.Alias)) == false); + + var localizedTours = backOfficeTours.Where(x => + string.IsNullOrWhiteSpace(x.Culture) || x.Culture.Equals(Security.CurrentUser.Language, + StringComparison.InvariantCultureIgnoreCase)).ToList(); + var tour = new BackOfficeTourFile { FileName = Path.GetFileNameWithoutExtension(tourFile), PluginName = pluginName, - Tours = tours - .Where(x => aliasFilters.Count == 0 || aliasFilters.All(filter => filter.IsMatch(x.Alias)) == false) - .ToArray() + Tours = localizedTours }; //don't add if all of the tours are filtered diff --git a/src/Umbraco.Web/Models/BackOfficeTour.cs b/src/Umbraco.Web/Models/BackOfficeTour.cs index 268d5667f4..d5987ec5bc 100644 --- a/src/Umbraco.Web/Models/BackOfficeTour.cs +++ b/src/Umbraco.Web/Models/BackOfficeTour.cs @@ -11,7 +11,7 @@ namespace Umbraco.Web.Models { public BackOfficeTour() { - RequiredSections = new List(); + RequiredSections = new List(); } [DataMember(Name = "name")] @@ -28,5 +28,8 @@ namespace Umbraco.Web.Models public List RequiredSections { get; set; } [DataMember(Name = "steps")] public BackOfficeTourStep[] Steps { get; set; } + + [DataMember(Name = "culture")] + public string Culture { get; set; } } }