summaryrefslogtreecommitdiff
path: root/src/StardewModdingAPI/Framework/ModHelpers
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-08-14 01:57:11 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-08-14 01:57:11 -0400
commit021672e43db021ae436e23ff45f3d85e2a595cb0 (patch)
treeda91247b71663d9d2accc3392aedfb74d740e1ea /src/StardewModdingAPI/Framework/ModHelpers
parent527b00ee13407d13d227ad2d4e2d14991eab77d9 (diff)
downloadSMAPI-021672e43db021ae436e23ff45f3d85e2a595cb0.tar.gz
SMAPI-021672e43db021ae436e23ff45f3d85e2a595cb0.tar.bz2
SMAPI-021672e43db021ae436e23ff45f3d85e2a595cb0.zip
add content helper properties for the current language
Diffstat (limited to 'src/StardewModdingAPI/Framework/ModHelpers')
-rw-r--r--src/StardewModdingAPI/Framework/ModHelpers/ContentHelper.cs6
1 files changed, 6 insertions, 0 deletions
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
*********/
+ /// <summary>The game's current locale code (like <c>pt-BR</c>).</summary>
+ public string CurrentLocale => this.ContentManager.GetLocale();
+
+ /// <summary>The game's current locale as an enum value.</summary>
+ public LocalizedContentManager.LanguageCode CurrentLocaleConstant => this.ContentManager.GetCurrentLanguage();
+
/// <summary>The observable implementation of <see cref="AssetEditors"/>.</summary>
internal ObservableCollection<IAssetEditor> ObservableAssetEditors { get; } = new ObservableCollection<IAssetEditor>();