diff --git a/uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs b/uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs index 4c484916..f185c972 100644 --- a/uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs +++ b/uSync.BackOffice/SyncHandlers/Handlers/LanguageHandler.cs @@ -65,11 +65,21 @@ protected override string GetPath(string folder, ILanguage item, bool GuidNames, protected override string GetItemPath(ILanguage item, bool useGuid, bool isFlat) => item.IsoCode.ToSafeFileName(shortStringHelper); - - /// - /// ensure we import the 'default' language first, so we don't get errors doing it. - /// - protected override IEnumerable GetImportFiles(string folder) + /// + /// order the merged items, making sure the default language is first. + /// + protected override IReadOnlyList GetMergedItems(string[] folders) + => base.GetMergedItems(folders) + .OrderBy(x => x.Node.Element("IsDefault").ValueOrDefault(false) ? 0 : 1) + .ToList(); + + /// + /// ensure we import the 'default' language first, so we don't get errors doing it. + /// + /// + /// prost v13.1 this method isn't used to determain the order for all options. + /// + protected override IEnumerable GetImportFiles(string folder) { var files = base.GetImportFiles(folder);