mirror of https://github.com/abpframework/abp.git
4 changed files with 25 additions and 30 deletions
@ -1,26 +0,0 @@ |
|||||
using System; |
|
||||
using System.Globalization; |
|
||||
|
|
||||
namespace Volo.Abp.AspNetCore.Mvc.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; |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue