mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-22 23:05:32 +00:00
18 lines
613 B
C#
18 lines
613 B
C#
using OMI.Formats.Languages;
|
|
|
|
namespace PckStudio.Core.Extensions
|
|
{
|
|
public static class LocFileExtensions
|
|
{
|
|
|
|
public static void InitializeDefault(this LOCFile locFile, string packName) => locFile.Initialize("en-EN", ("IDS_DISPLAY_NAME", packName));
|
|
|
|
public static void Initialize(this LOCFile locFile, string language, params (string, string)[] locKeyValuePairs)
|
|
{
|
|
locFile.AddLanguage(language);
|
|
foreach ((string, string) locKeyValue in locKeyValuePairs)
|
|
locFile.AddLocKey(locKeyValue.Item1, locKeyValue.Item2);
|
|
}
|
|
}
|
|
}
|