src/BloomExe/web/controllers/CommonApi.cs
/// <summary>
/// Returns json with property languages, an array of objects (one for each UI language Bloom knows about)
/// each having label (what to show in a menu) and tag (the language code).
/// Used in language select control in hint bubbles tab of text box properties dialog
/// brought up from cog control in origami mode.
/// </summary>
/// <param name="request"></param>
Returns json with property languages, an array of objects (one for each UI language Bloom knows about)
each having label (what to show in a menu) and tag (the language code).
Used in language select control in hint bubbles tab of text box properties dialog
brought up from cog control in origami mode.
Returns json with property languages an array of objects ( one for each UI language Bloom knows about ) each having label ( what to show in a menu ) and tag ( the language code ) . Used in language select control in hint bubbles tab of text box properties dialog brought up from cog control in origami mode .
public void HandleUiLanguages(ApiRequest request)
		{
			lock (request)
			{
				var langs = new List<object>();
				foreach (var code in L10NSharp.LocalizationManager.GetAvailableLocalizedLanguages())
				{
					var langItem = WorkspaceView.CreateLanguageItem(code);
					langs.Add(new { label = langItem.MenuText, tag = code });
				}
				request.ReplyWithJson(JsonConvert.SerializeObject(new { languages = langs }));
			}
		}
public void HandleUiLanguages ( ApiRequest request ) { lock ( request ) { var langs = new List < object > ( ) ; foreach ( var code in L10NSharp . LocalizationManager . GetAvailableLocalizedLanguages ( ) ) { var langItem = WorkspaceView . CreateLanguageItem ( code ) ; langs . Add ( new { label = langItem . MenuText , tag = code } ) ; } request . ReplyWithJson ( JsonConvert . SerializeObject ( new { languages = langs } ) ) ; } }
Returns json with property languages, an array of objects (one for each UI language Bloom knows about)
each having label (what to show in a menu) and tag (the language code).
Returns json with property languages an array of objects ( one for each UI language Bloom knows about ) each having label ( what to show in a menu ) and tag ( the language code ) .
request
ApiRequest
None