diff --git a/Libraries/SPTarkov.Server.Core/Services/LocaleService.cs b/Libraries/SPTarkov.Server.Core/Services/LocaleService.cs
index 0f32472d..6b53671b 100644
--- a/Libraries/SPTarkov.Server.Core/Services/LocaleService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/LocaleService.cs
@@ -73,7 +73,21 @@ public class LocaleService(
/// A dictionary representing the merged result of database and custom locales.
private Dictionary CombineDbWithCustomLocales(Dictionary dbLocales, Dictionary customLocales)
{
- return dbLocales.Union(customLocales).ToDictionary(x => x.Key, x => x.Value);
+ try
+ {
+ return dbLocales
+ .Concat(customLocales)
+ .GroupBy(kvp => kvp.Key)
+ .ToDictionary(
+ group => group.Key,
+ group => group.Last().Value
+ );
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e);
+ throw;
+ }
}
///
@@ -241,7 +255,7 @@ public class LocaleService(
if (!localeDictToAddTo.TryAdd(localeKey, localeValue))
{
- _logger.Error($"Unable to add: {localeKey} {localeValue} to custom locale dictionary: {locale}");
+ localeDictToAddTo[localeKey] = localeValue;
}
}