Class LanguageInfo
- Namespace
- Uncreated.Warfare.Models.Localization
- Assembly
- Uncreated.Warfare.dll
[Table("lang_info")]
public class LanguageInfo : ITranslationArgument, IEquatable<LanguageInfo>
- Inheritance
-
LanguageInfo
- Implements
- Inherited Members
- Extension Methods
Constructors
LanguageInfo()
public LanguageInfo()
LanguageInfo(string, LanguageService)
public LanguageInfo(string tempCode, LanguageService langService)
Parameters
tempCodestringlangServiceLanguageService
Fields
FormatCode
public static readonly SpecialFormat FormatCode
Field Value
FormatDisplayName
public static readonly SpecialFormat FormatDisplayName
Field Value
Properties
Aliases
public IList<LanguageAlias> Aliases { get; set; }
Property Value
Code
[Required]
[Column(TypeName = "char(5)")]
public string Code { get; set; }
Property Value
Contributors
public IList<LanguageContributor> Contributors { get; set; }
Property Value
DefaultCultureCode
[MaxLength(16)]
public string? DefaultCultureCode { get; set; }
Property Value
DisplayName
[Required]
[MaxLength(64)]
public string DisplayName { get; set; }
Property Value
FallbackTranslationLanguageCode
[Column(TypeName = "char(5)")]
public string? FallbackTranslationLanguageCode { get; set; }
Property Value
HasTranslationSupport
public bool HasTranslationSupport { get; set; }
Property Value
IsDefault
[JsonIgnore]
[NotMapped]
public bool IsDefault { get; }
Property Value
Key
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("pk")]
public uint Key { get; set; }
Property Value
NativeName
[MaxLength(64)]
public string? NativeName { get; set; }
Property Value
RequiresIMGUI
public bool RequiresIMGUI { get; set; }
Property Value
SteamLanguageName
[MaxLength(32)]
public string? SteamLanguageName { get; set; }
Property Value
Support
[NotMapped]
public float Support { get; }
Property Value
SupportedCultures
public IList<LanguageCulture> SupportedCultures { get; set; }
Property Value
SupportsPluralization
public bool SupportsPluralization { get; set; }
Property Value
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current object.
Returns
Equals(LanguageInfo?)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(LanguageInfo? other)
Parameters
otherLanguageInfoAn object to compare with this object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
GetUnturnedLanguageName()
Gets the language in Unturned's naming scheme, or null if Unturned (Steam) doesn't support this language.
public string? GetUnturnedLanguageName()
Returns
SupportsCulture(CultureInfo)
If this language goes with culture.
public bool SupportsCulture(CultureInfo culture)
Parameters
cultureCultureInfo
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Translate(ITranslationValueFormatter, in ValueFormatParameters)
Allows objects to define how they're translated in their own definition instead of creating a value converter.
public string Translate(ITranslationValueFormatter formatter, in ValueFormatParameters parameters)
Parameters
formatterITranslationValueFormatterparametersValueFormatParameters
Returns
Operators
operator ==(LanguageInfo?, LanguageInfo?)
Compare two LanguageInfo objects.
public static bool operator ==(LanguageInfo? left, LanguageInfo? right)
Parameters
leftLanguageInforightLanguageInfo
Returns
operator !=(LanguageInfo?, LanguageInfo?)
Compare two LanguageInfo objects.
public static bool operator !=(LanguageInfo? left, LanguageInfo? right)
Parameters
leftLanguageInforightLanguageInfo