Repository navigation
Expand file tree
/
Copy pathILocalizedEntityService.cs
More file actions
77 lines (69 loc) · 2.89 KB
/
Copy pathILocalizedEntityService.cs
File metadata and controls
77 lines (69 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using SmartStore.Core;
using SmartStore.Core.Domain.Localization;
namespace SmartStore.Services.Localization
{
/// <summary>
/// Localized entity service interface
/// </summary>
public partial interface ILocalizedEntityService : IScopedService
{
/// <summary>
/// Deletes a localized property
/// </summary>
/// <param name="localizedProperty">Localized property</param>
void DeleteLocalizedProperty(LocalizedProperty localizedProperty);
/// <summary>
/// Gets a localized property
/// </summary>
/// <param name="localizedPropertyId">Localized property identifier</param>
/// <returns>Localized property</returns>
LocalizedProperty GetLocalizedPropertyById(int localizedPropertyId);
/// <summary>
/// Find localized value
/// </summary>
/// <param name="languageId">Language identifier</param>
/// <param name="entityId">Entity identifier</param>
/// <param name="localeKeyGroup">Locale key group</param>
/// <param name="localeKey">Locale key</param>
/// <returns>Found localized value</returns>
string GetLocalizedValue(int languageId, int entityId, string localeKeyGroup, string localeKey);
/// <summary>
/// Gets localized properties
/// </summary>
/// <param name="entityId">Entity identifier</param>
/// <param name="localeKeyGroup">Locale key group</param>
/// <returns>Localized properties</returns>
IList<LocalizedProperty> GetLocalizedProperties(int entityId, string localeKeyGroup);
/// <summary>
/// Inserts a localized property
/// </summary>
/// <param name="localizedProperty">Localized property</param>
void InsertLocalizedProperty(LocalizedProperty localizedProperty);
/// <summary>
/// Updates the localized property
/// </summary>
/// <param name="localizedProperty">Localized property</param>
void UpdateLocalizedProperty(LocalizedProperty localizedProperty);
/// <summary>
/// Save localized value
/// </summary>
/// <typeparam name="T">Type</typeparam>
/// <param name="entity">Entity</param>
/// <param name="keySelector">Key selector</param>
/// <param name="localeValue">Locale value</param>
/// <param name="languageId">Language ID</param>
void SaveLocalizedValue<T>(
T entity,
Expression<Func<T, string>> keySelector,
string localeValue,
int languageId) where T : BaseEntity, ILocalizedEntity;
void SaveLocalizedValue<T, TPropType>(
T entity,
Expression<Func<T, TPropType>> keySelector,
TPropType localeValue,
int languageId) where T : BaseEntity, ILocalizedEntity;
}
}