From 021672e43db021ae436e23ff45f3d85e2a595cb0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Mon, 14 Aug 2017 01:57:11 -0400 Subject: add content helper properties for the current language --- src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/StardewModdingAPI/Framework/ModHelpers') diff --git a/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs index 1e987f00..e94d309e 100644 --- a/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs +++ b/src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs @@ -40,6 +40,12 @@ namespace StardewModdingAPI.Framework.ModHelpers /********* ** Accessors *********/ + /// The game's current locale code (like pt-BR). + public string CurrentLocale => this.ContentManager.GetLocale(); + + /// The game's current locale as an enum value. + public LocalizedContentManager.LanguageCode CurrentLocaleConstant => this.ContentManager.GetCurrentLanguage(); + /// The observable implementation of . internal ObservableCollection ObservableAssetEditors { get; } = new ObservableCollection(); -- cgit