private void InitLocalization() { var localization = Localization.Current; localization.localCultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); context.GetContainer().Register(localization); }
public LanguageElementViewModel() { this.changeLanguageCommand = new SimpleCommand(() => { GameManager.instance.LocalizationChess.CultureInfo = Locale.GetCultureInfoByLanguage(language); PlayerPrefs.SetString("language", language.ToString()); this.changeLanguageCommand.Enabled = true; }); }
void Awake() { CultureInfo cultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); Localization.Current = Localization.Create(new DefaultDataProvider("LocalizationTutorials", new XmlDocumentParser()), cultureInfo); this.localization = Localization.Current; this.dropdown.onValueChanged.AddListener(OnValueChanged); }
void Awake() { localization = Localization.Current; localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); InitButton(); InitListener(); }
void Awake() { ApplicationContext context = Context.GetApplicationContext(); BindingServiceBundle bindingService = new BindingServiceBundle(context.GetContainer()); bindingService.Start(); CultureInfo cultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); Localization.Current = Localization.Create(new DefaultDataProvider("LocalizationTutorials", new XmlDocumentParser()), cultureInfo); this.localization = Localization.Current; }
void Start() { CultureInfo cultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.Chinese); var localization = Localization.Current; localization.CultureInfo = cultureInfo; localization.AddDataProvider(new DefaultCsvDataProvider("LocalizationCsv", new CsvDocumentParser())); Debug.LogFormat("{0}", localization.GetText("app.name")); Debug.LogFormat("{0}", localization.GetText("databinding.tutorials.title")); }
void Awake() { this.localization = Localization.Current; this.localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); //Use files in xml format this.localization.AddDataProvider(new DefaultDataProvider("LocalizationTutorials", new XmlDocumentParser())); //Use files in asset format //this.localization.AddDataProvider(new DefaultLocalizationSourceDataProvider("LocalizationTutorials", "LocalizationModule.asset")); this.dropdown.onValueChanged.AddListener(OnValueChanged); }
void Awake() { ApplicationContext context = Context.GetApplicationContext(); BindingServiceBundle bindingService = new BindingServiceBundle(context.GetContainer()); bindingService.Start(); this.localization = Localization.Current; CultureInfo cultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); this.localization.CultureInfo = cultureInfo; //this.localization.AddDataProvider(new DefaultDataProvider("LocalizationTutorials", new XmlDocumentParser())); this.localization.AddDataProvider(new DefaultLocalizationSourceDataProvider("LocalizationTutorials", "LocalizationModule.asset")); }
protected override void Awake() { ApplicationContext context = Context.GetApplicationContext(); ILRuntimeBindingServiceBundle bindingService = new ILRuntimeBindingServiceBundle(context.GetContainer()); bindingService.Start(); CultureInfo cultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); localization = Localization.Current; localization.CultureInfo = cultureInfo; localization.AddDataProvider(new DefaultDataProvider("Localizations", new XmlDocumentParser())); context.GetContainer().Register <Localization>(localization); }
public void OnValueChanged(int value) { switch (value) { case 0: this.localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); break; case 1: this.localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.ChineseSimplified); break; default: this.localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); break; } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } DontDestroyOnLoad(this); ApplicationContext context = Context.GetApplicationContext(); BindingServiceBundle bindingService = new BindingServiceBundle(context.GetContainer()); bindingService.Start(); this.localizationChess = Localization.Current; CultureInfo cultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); this.LocalizationChess.CultureInfo = cultureInfo; //this.localization.AddDataProvider(new DefaultDataProvider("LocalizationTutorials", new XmlDocumentParser())); this.LocalizationChess.AddDataProvider(new DefaultLocalizationSourceDataProvider("LocalizationChess", "LocalizationModule.asset")); }
private void OnClickId() { localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.Indonesian); }
private void OnClickEn() { localization.CultureInfo = Locale.GetCultureInfoByLanguage(SystemLanguage.English); }