/// <summary> /// Get the localized string name of the given music type. /// </summary> /// <param name="musicType">The music type to localize.</param> /// <returns>The localized name of the music type.</returns> public static string GetLocalizedMusicType(MusicTypeIndex musicType) { if (gLocalizer == null) { return(musicType.ToString()); } string result = gLocalizer.GetLocalizedString(kMusicTypeLocalKeys[(int)musicType]); if (string.IsNullOrEmpty(result)) { return(musicType.ToString()); } return(result); }
/// <summary> /// Localizes the labels of the controls /// using the game engine's localization service. /// </summary> public void Localize() { ScriptCore.LocalizedStringService gStringTable = ScriptCoreManager.LocalizedStringService; if (gStringTable != null) { string local = gStringTable.GetLocalizedString(kVideoSoundCapture); if (!string.IsNullOrEmpty(local)) { soundCaptureCHK.Text = local; } local = gStringTable.GetLocalizedString(kHideUITitleText); if (!string.IsNullOrEmpty(local)) { hideUiCHK.Text = local; } local = gStringTable.GetLocalizedString(kRecordingTimeText); if (!string.IsNullOrEmpty(local)) { maxRecordTimeGRP.Text = local; } local = gStringTable.GetLocalizedString(kRecordingTimeUnitText); if (!string.IsNullOrEmpty(local)) { secondsLBL.Text = local; } local = gStringTable.GetLocalizedString(kFrameSizeText); if (!string.IsNullOrEmpty(local)) { frameSizeGRP.Text = local; } for (int i = 0; i < 3; i++) { local = gStringTable.GetLocalizedString(kFrameSizeKeys[i]); if (!string.IsNullOrEmpty(local)) { this.mFrameSizeRads[i].Text = local; } } local = gStringTable.GetLocalizedString(kQualityText); if (!string.IsNullOrEmpty(local)) { qualityGRP.Text = local; } for (int j = 0; j < 4; j++) { local = gStringTable.GetLocalizedString(kQualityKeys[j]); if (!string.IsNullOrEmpty(local)) { this.mQualityRads[j].Text = local; } } } }