Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ITranslationProvider.LoadTranslationsAsync() #15886

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
IPluralStringLocalizer.GetTranslationAsync()
  • Loading branch information
hishamco committed Apr 26, 2024
commit 62a0e0b8357e8c01ff8717604e7b527b370ef395
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.Localization;

namespace OrchardCore.Localization;
Expand All @@ -13,5 +15,15 @@ public interface IPluralStringLocalizer : IStringLocalizer
/// <param name="name">The resource name.</param>
/// <param name="arguments">Optional parameters that can be used inside the resource key.</param>
/// <returns>A list of localized strings including the plural forms.</returns>
(LocalizedString, object[]) GetTranslation(string name, params object[] arguments);
[Obsolete("This method is deprecated, please use GetTranslationAsync instead.")]
(LocalizedString, object[]) GetTranslation(string name, params object[] arguments)
=> GetTranslationAsync(name, arguments).GetAwaiter().GetResult();

/// <summary>
/// Gets the localized strings.
/// </summary>
/// <param name="name">The resource name.</param>
/// <param name="arguments">Optional parameters that can be used inside the resource key.</param>
/// <returns>A list of localized strings including the plural forms.</returns>
Task<(LocalizedString, object[])> GetTranslationAsync(string name, params object[] arguments);
}
Loading
Loading