- add: language
This commit is contained in:
20
Nebula.Launcher/Controls/LocalizedLabel.cs
Normal file
20
Nebula.Launcher/Controls/LocalizedLabel.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Nebula.Launcher.Services;
|
||||
|
||||
namespace Nebula.Launcher.Controls;
|
||||
|
||||
public class LocalizedLabel : Label
|
||||
{
|
||||
public static readonly StyledProperty<string> LocalIdProperty = AvaloniaProperty.Register<LocalizedLabel, string>(nameof(LocalId));
|
||||
|
||||
public string LocalId
|
||||
{
|
||||
get => GetValue(LocalIdProperty);
|
||||
set
|
||||
{
|
||||
SetValue(LocalIdProperty, value);
|
||||
Content = LocalisationService.GetString(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user