LocaleIdentifier(string)
Creates an identifier from a culture code.
阅读时间1 分钟最后更新于 1 个月前
Definition
- Type: Constructor
- Namespace: Unity.Localization
- Assembly: UnityEngine.LocalizationRuntimeModule
public LocaleIdentifier(string code)
Parameters
The culture code, for example "en" or "fr-CA".
Remarks
A null or empty code produces the undefined locale, whose LocaleIdentifier.Code is the empty string.
Create an identifier from a culture code.
Examples
using Unity.Localization;namespace Unity.Localization.Samples{ public class LocaleIdentifierConstructorExample { public LocaleIdentifier Run() => new LocaleIdentifier("fr-CA"); }}