| 1234567891011121314151617181920212223242526 |
- using System.Globalization;
- using Abp.Extensions;
- namespace Abp.Localization
- {
- internal static class GlobalizationHelper
- {
- public static bool IsValidCultureCode(string cultureCode)
- {
- if (cultureCode.IsNullOrWhiteSpace())
- {
- return false;
- }
- try
- {
- CultureInfo.GetCultureInfo(cultureCode);
- return true;
- }
- catch (CultureNotFoundException)
- {
- return false;
- }
- }
- }
- }
|