diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-11-01 15:56:42 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-11-01 15:56:42 -0400 |
| commit | 5e879484e9f4604679af59633019b9ddf7a8903e (patch) | |
| tree | a6427b153fa6be62e05bda521e912b512949e1e8 /Emby.Server.Implementations/Localization/LocalizationManager.cs | |
| parent | 5d4c58ffc4631401660cd0418194fbe10e78ce4c (diff) | |
| parent | d765f370b35bdc8c74a6b74a82796efcea97f762 (diff) | |
Merge pull request #2994 from MediaBrowser/dev
Dev
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); |
