2025-01-26 09:15:28 +00:00
|
|
|
using Godot;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using Godot.Collections;
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[Tool]
|
2025-02-12 16:48:15 +00:00
|
|
|
[GlobalClass,Icon("res://addons/rokojori_action_library/Icons/LocalizedString.svg")]
|
2025-01-26 09:15:28 +00:00
|
|
|
public partial class LocalizedString:Resource
|
|
|
|
{
|
|
|
|
public virtual string GetLocalizedString( LocaleCode localeCode )
|
|
|
|
{
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
|
2025-02-12 16:48:15 +00:00
|
|
|
public string currentValue
|
|
|
|
{
|
|
|
|
get
|
|
|
|
{
|
|
|
|
return GetLocalizedString( LocaleManager.currentLanguage );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static string Get( LocalizedString ls, string alternative = "")
|
|
|
|
{
|
|
|
|
return ls == null ? alternative : ls.currentValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-01-26 09:15:28 +00:00
|
|
|
}
|
|
|
|
}
|