Try your search with a different keyword or use * as a wildcard.
using System.Linq.Expressions;
using Nop.Core;
using Nop.Core.Configuration;
using Nop.Core.Domain.Localization;
using Nop.Core.Domain.Security;
using Nop.Services.Plugins;
namespace Nop.Services.Localization;
///
/// Localization manager interface
///
public partial interface ILocalizationService
{
///
/// Deletes a locale string resource
///
/// Locale string resource
/// A task that represents the asynchronous operation
Task DeleteLocaleStringResourceAsync(LocaleStringResource localeStringResource);
///
/// Deletes a locale string resource
///
/// Locale string resource
void DeleteLocaleStringResource(LocaleStringResource localeStringResource);
///
/// Gets a locale string resource
///
/// Locale string resource identifier
///
/// A task that represents the asynchronous operation
/// The task result contains the locale string resource
///
Task GetLocaleStringResourceByIdAsync(int localeStringResourceId);
///
/// Gets a locale string resource
///
/// A string representing a resource name
/// Language identifier
/// A value indicating whether to log error if locale string resource is not found
///
/// A task that represents the asynchronous operation
/// The task result contains the locale string resource
///
Task GetLocaleStringResourceByNameAsync(string resourceName, int languageId,
bool logIfNotFound = true);
///
/// Gets a locale string resource
///
/// A string representing a resource name
/// Language identifier
/// A value indicating whether to log error if locale string resource is not found
///
/// The locale string resource
///
LocaleStringResource GetLocaleStringResourceByName(string resourceName, int languageId,
bool logIfNotFound = true);
///
/// Inserts a locale string resource
///
/// Locale string resource
/// A task that represents the asynchronous operation
Task InsertLocaleStringResourceAsync(LocaleStringResource localeStringResource);
///
/// Updates the locale string resource
///
/// Locale string resource
/// A task that represents the asynchronous operation
Task UpdateLocaleStringResourceAsync(LocaleStringResource localeStringResource);
///
/// Updates the locale string resource
///
/// Locale string resource
void UpdateLocaleStringResource(LocaleStringResource localeStringResource);
///
/// Gets all locale string resources by language identifier
///
/// Language identifier
/// A value indicating whether to load data for the public store only (if "false", then for admin area only. If null, then load all locales. We use it for performance optimization of the site startup
///
/// A task that represents the asynchronous operation
/// The task result contains the locale string resources
///
Task>> GetAllResourceValuesAsync(int languageId, bool? loadPublicLocales);
///
/// Gets a resource string based on the specified ResourceKey property.
///
/// A string representing a ResourceKey.
///
/// A task that represents the asynchronous operation
/// The task result contains a string representing the requested resource string.
///
Task GetResourceAsync(string resourceKey);
///
/// Gets a resource string based on the specified ResourceKey property.
///
/// A string representing a ResourceKey.
/// Language identifier
/// A value indicating whether to log error if locale string resource is not found
/// Default value
/// A value indicating whether an empty string will be returned if a resource is not found and default value is set to empty string
///
/// A task that represents the asynchronous operation
/// The task result contains a string representing the requested resource string.
///
Task GetResourceAsync(string resourceKey, int languageId,
bool logIfNotFound = true, string defaultValue = "", bool returnEmptyIfNotFound = false);
///
/// Export language resources to XML
///
/// Language
///
/// A task that represents the asynchronous operation
/// The task result contains the result in XML format
///
Task ExportResourcesToXmlAsync(Language language);
///
/// Import language resources from XML file
///
/// Language
/// Stream reader of XML file
/// A value indicating whether to update existing resources
/// A task that represents the asynchronous operation
Task ImportResourcesFromXmlAsync(Language language, StreamReader xmlStreamReader, bool updateExistingResources = true);
///
/// Get localized property of an entity
///
/// Entity type
/// Property type
/// Entity
/// Key selector
/// Language identifier; pass null to use the current working language; pass 0 to get standard language value
/// A value indicating whether to return default value (if localized is not found)
/// A value indicating whether to ensure that we have at least two published languages; otherwise, load only default value
///
/// A task that represents the asynchronous operation
/// The task result contains the localized property
///
Task GetLocalizedAsync(TEntity entity, Expression> keySelector,
int? languageId = null, bool returnDefaultValue = true, bool ensureTwoPublishedLanguages = true)
where TEntity : BaseEntity, ILocalizedEntity;
///
/// Get localized property of setting
///
/// Settings type
/// Settings
/// Key selector
/// Language identifier
/// Store identifier
/// A value indicating whether to return default value (if localized is not found)
/// A value indicating whether to ensure that we have at least two published languages; otherwise, load only default value
///
/// A task that represents the asynchronous operation
/// The task result contains the localized property
///
Task GetLocalizedSettingAsync(TSettings settings, Expression> keySelector,
int languageId, int storeId, bool returnDefaultValue = true, bool ensureTwoPublishedLanguages = true)
where TSettings : ISettings, new();
///
/// Save localized property of setting
///
/// Settings type
/// Settings
/// Key selector
/// Language identifier
/// Localized value
///
/// A task that represents the asynchronous operation
/// The task result contains the localized property
///
Task SaveLocalizedSettingAsync(TSettings settings, Expression> keySelector,
int languageId, string value) where TSettings : ISettings, new();
///
/// Get localized value of enum
///
/// Enum type
/// Enum value
/// Language identifier; pass null to use the current working language
///
/// A task that represents the asynchronous operation
/// The task result contains the localized value
///
Task GetLocalizedEnumAsync(TEnum enumValue, int? languageId = null) where TEnum : struct;
///
/// Get localized value of enum
/// We don't have UI to manage permission localizable name. That's why we're using this method
///
/// Permission record
/// Language identifier; pass null to use the current working language
///
/// A task that represents the asynchronous operation
/// The task result contains the localized value
///
Task GetLocalizedPermissionNameAsync(PermissionRecord permissionRecord, int? languageId = null);
///
/// Save localized name of a permission
///
/// Permission record
/// A task that represents the asynchronous operation
Task SaveLocalizedPermissionNameAsync(PermissionRecord permissionRecord);
///
/// Delete a localized name of a permission
///
/// Permission record
/// A task that represents the asynchronous operation
Task DeleteLocalizedPermissionNameAsync(PermissionRecord permissionRecord);
///
/// Add a locale resource (if new) or update an existing one
///
/// Resource name
/// Resource value
/// Language culture code. If null or empty, then a resource will be added for all languages
/// A task that represents the asynchronous operation
Task AddOrUpdateLocaleResourceAsync(string resourceName, string resourceValue, string languageCulture = null);
///
/// Add locale resources
///
/// Resource name-value pairs
/// Language identifier; pass null to add the passed resources for all languages
/// A task that represents the asynchronous operation
Task AddOrUpdateLocaleResourceAsync(IDictionary resources, int? languageId = null);
///
/// Add locale resources
///
/// Resource name-value pairs
/// Language identifier; pass null to add the passed resources for all languages
void AddOrUpdateLocaleResource(IDictionary resources, int? languageId = null);
///
/// Delete a locale resource
///
/// Resource name
/// A task that represents the asynchronous operation
Task DeleteLocaleResourceAsync(string resourceName);
///
/// Delete locale resources
///
/// Resource names
/// Language identifier; pass null to delete the passed resources from all languages
/// A task that represents the asynchronous operation
Task DeleteLocaleResourcesAsync(IList resourceNames, int? languageId = null);
///
/// Delete locale resources
///
/// Resource names
/// Language identifier; pass null to delete the passed resources from all languages
void DeleteLocaleResources(IList resourceNames, int? languageId = null);
///
/// Delete locale resources by the passed name prefix
///
/// Resource name prefix
/// Language identifier; pass null to delete resources by prefix from all languages
/// A task that represents the asynchronous operation
Task DeleteLocaleResourcesAsync(string resourceNamePrefix, int? languageId = null);
///
/// Get localized friendly name of a plugin
///
/// Plugin type
/// Plugin
/// Language identifier
/// A value indicating whether to return default value (if localized is not found)
///
/// A task that represents the asynchronous operation
/// The task result contains the localized value
///
Task GetLocalizedFriendlyNameAsync(TPlugin plugin, int languageId, bool returnDefaultValue = true)
where TPlugin : IPlugin;
///
/// Save localized friendly name of a plugin
///
/// Plugin
/// Plugin
/// Language identifier
/// Localized friendly name
/// A task that represents the asynchronous operation
Task SaveLocalizedFriendlyNameAsync(TPlugin plugin, int languageId, string localizedFriendlyName)
where TPlugin : IPlugin;
}