diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-11-02 12:11:04 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2017-11-02 12:11:04 -0400 |
| commit | 4c1834c087cbfb06cd3111571dbc4c73d4ff6a0e (patch) | |
| tree | 934dd0f910170771b7fcd099f659e4747fa4efe7 /Emby.Server.Implementations/Localization/LocalizationManager.cs | |
| parent | fed5f9e89ba013f8e9b5af71377eb7ee12f51644 (diff) | |
| parent | 008cea6984d4e4bbdfb0b893e4cf0b6c59cb9d69 (diff) | |
Merge branch 'master' of https://github.com/MediaBrowser/Emby
Diffstat (limited to 'Emby.Server.Implementations/Localization/LocalizationManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Localization/LocalizationManager.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 650f388a1..2eb4743cd 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -308,6 +308,19 @@ namespace Emby.Server.Implementations.Localization return value == null ? (int?)null : value.Value; } + public bool HasUnicodeCategory(string value, UnicodeCategory category) + { + foreach (var chr in value) + { + if (char.GetUnicodeCategory(chr) == category) + { + return true; + } + } + + return false; + } + public string GetLocalizedString(string phrase) { return GetLocalizedString(phrase, _configurationManager.Configuration.UICulture); |
