Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


LocaleIdentifier(string)

Creates an identifier from a culture code.
Read time 1 minuteLast updated 12 days ago

Definition

  • Type: Constructor
  • Namespace: Unity.Localization
  • Assembly: UnityEngine.LocalizationRuntimeModule
public LocaleIdentifier(string code)

Parameters

code

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"); }}