Files
Outer-Wilds-SK-Translation-Mod/SlovakTranslation.cs
T
Jaroslav Beneš e66ce54d3e Add OWML mod skeleton and import English translation template
Phase 2 (mod skeleton) + Phase 3 (import English source):

- manifest.json / SlovakTranslation.cs / ILocalizationAPI.cs registering
  "Slovenčina" via xen.LocalizationUtility (Interplanetary Polyglot).
- SlovakTranslation.csproj / .sln building net48 against the OWML and
  OuterWildsGameLibs NuGet packages — no game install needed to compile.
- assets/Translation.xml: English source template (896 KB, 2424 entries,
  keys == values) to be translated into Slovak.
- Project docs (README/PLAN/CLAUDE) and .gitignore.

Build verified: dotnet build -c Release stages a loadable mod folder.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-20 10:12:10 +02:00

36 lines
1.2 KiB
C#

using OWML.Common;
using OWML.ModHelper;
namespace SlovakTranslation
{
/// <summary>
/// Registers Slovenčina as a selectable language via xen-42's Localization
/// Utility (xen.LocalizationUtility). All the heavy lifting lives in the
/// utility; this mod just points it at our translated strings.
/// </summary>
public class SlovakTranslation : ModBehaviour
{
public static SlovakTranslation Instance;
/// <summary>Path (relative to the mod folder) to the translated strings.</summary>
public static string translationFile = "assets/Translation.xml";
private void Start()
{
Instance = this;
var api = ModHelper.Interaction.TryGetModApi<ILocalizationAPI>("xen.LocalizationUtility");
if (api == null)
{
ModHelper.Console.WriteLine(
"Could not find xen.LocalizationUtility — is Interplanetary Polyglot installed?",
MessageType.Error);
return;
}
api.RegisterLanguage(this, "Slovenčina", translationFile);
ModHelper.Console.WriteLine("Registered language: Slovenčina", MessageType.Success);
}
}
}