using OWML.Common; using OWML.ModHelper; namespace SlovakTranslation { /// /// 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. /// public class SlovakTranslation : ModBehaviour { public static SlovakTranslation Instance; /// Path (relative to the mod folder) to the translated strings. public static string translationFile = "assets/Translation.xml"; private void Start() { Instance = this; var api = ModHelper.Interaction.TryGetModApi("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); } } }