-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathLocalizeAttribute.cs
29 lines (26 loc) · 1.08 KB
/
LocalizeAttribute.cs
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
using System;
namespace CodingSeb.Localization
{
/// <summary>
/// To specify that a property is a localization and need to has a PropertyChanged event when the current language changed
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class LocalizeAttribute : Attribute
{
/// <summary>
/// To specify that a property is a localization and need to has a PropertyChanged event when the current language changed
/// </summary>
public LocalizeAttribute() { }
/// <summary>
/// To specify that a property is a localization and need to has a PropertyChanged event when the current language changed
/// and inject code in the property of the translation
/// </summary>
/// <param name="textId">The Text Id for the translation to inject in this property</param>
public LocalizeAttribute(string textId)
{ }
/// <summary>
/// The default TextTo return if the translation does not exist.
/// </summary>
public string DefaultValue { get; set; }
}
}