Browse Source

Merge pull request #15440 from abpframework/auto-merge/rel-7-0/1660

Merge branch dev with rel-7.0
pull/15471/head
maliming 4 years ago
committed by GitHub
parent
commit
8a6aece6f4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs

8
framework/src/Volo.Abp.Localization/Volo/Abp/Localization/LanguageInfo.cs

@ -1,4 +1,5 @@
using System;
using System.Globalization;
using JetBrains.Annotations;
namespace Volo.Abp.Localization;
@ -15,9 +16,13 @@ public class LanguageInfo : ILanguageInfo
[NotNull]
public virtual string DisplayName { get; protected set; }
[NotNull]
public virtual string TwoLetterISOLanguageName { get; protected set; }
[CanBeNull]
public virtual string FlagIcon { get; set; }
protected LanguageInfo()
{
@ -49,5 +54,8 @@ public class LanguageInfo : ILanguageInfo
DisplayName = !displayName.IsNullOrWhiteSpace()
? displayName
: cultureName;
TwoLetterISOLanguageName = new CultureInfo(cultureName)
.TwoLetterISOLanguageName;
}
}

Loading…
Cancel
Save