diff --git a/Libraries/Core/Services/I18nService.cs b/Libraries/Core/Services/I18nService.cs index a247c362..7e310aa6 100644 --- a/Libraries/Core/Services/I18nService.cs +++ b/Libraries/Core/Services/I18nService.cs @@ -96,13 +96,16 @@ public class I18nService { return rawLocalizedString; } + + var typeToCheck = args.GetType(); + var typeProps = typeToCheck.GetProperties(); foreach (var propertyInfo in args.GetType().GetProperties()) { var localizedName = $"{{{{{propertyInfo.GetJsonName()}}}}}"; if (rawLocalizedString.Contains(localizedName)) { - rawLocalizedString.Replace(localizedName, propertyInfo.GetValue(args, null)?.ToString() ?? string.Empty); + rawLocalizedString = rawLocalizedString.Replace(localizedName, propertyInfo.GetValue(args)?.ToString() ?? string.Empty); } } return rawLocalizedString;