Ejemplo n.º 1
0
        /// <summary>
        /// Localize form
        /// </summary>
        /// <param name="form">Form</param>
        /// <param name="language">Language (null to get from model settings)</param>
        /// /// <param name="language">Form alias</param>
        public void LocalizeForm(LocalizableForm form, string language = null, string formAlias = null)
        {
            string name = formAlias ?? form.Name;

            LocalizeDeep(name, form.Controls, language);

            string caption = GetLocalizedText(name, "Caption", language);

            if (caption != null && !form.IgnoreLocalizationProperties.Contains("Text"))
            {
                form.Text = caption;
            }
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Localize form
		/// </summary>
		/// <param name="form">Form</param>
		/// <param name="language">Language (null to get from model settings)</param>
		/// /// <param name="language">Form alias</param>
		public void LocalizeForm(LocalizableForm form, string language = null, string formAlias = null)
		{
			string name = formAlias ?? form.Name;

			LocalizeDeep(name, form.Controls, language);

			string caption = GetLocalizedText(name, "Caption", language);

			if (caption != null && !form.IgnoreLocalizationProperties.Contains("Text"))
			{
				form.Text = caption;
			}
		}