public IViewComponentResult Invoke(
        ILocalizableString text,
        string name,
        string icon,
        string id,
        ILocalizableString busyText,
        FontIconType iconType,
        AbpButtonType type,
        AbpButtonSize size,
        bool disabled)
    {
        Check.NotNull(text, nameof(text));

        return(View(
                   "~/Pages/Shared/Components/AbpPageToolbar/Button/Default.cshtml",
                   new AbpPageToolbarButtonViewModel(
                       text.Localize(StringLocalizerFactory),
                       name,
                       icon,
                       id,
                       busyText?.Localize(StringLocalizerFactory),
                       iconType,
                       type,
                       size,
                       disabled
                       )
                   ));
    }
예제 #2
0
 public string L(ILocalizableString localizableString)
 {
     if (featureDescriptor == null)
     {
         return(null);
     }
     return(localizableString.Localize(WorkContext.Resolve <ILocalizationContext>()));
 }
 /// <summary>
 /// Localizes the string in current culture.
 /// </summary>
 /// <param name="localizableString">Localizable string instance</param>
 /// <param name="localizationManager">Localization manager</param>
 /// <param name="culture">culture</param>
 /// <returns>Localized string</returns>
 public static string Localize(this ILocalizableString localizableString, ILocalizationManager localizationManager, CultureInfo culture)
 {
     return(localizableString.Localize(new LocalizationContext(localizationManager), culture));
 }
 /// <summary>
 /// Localizes the string in current culture.
 /// </summary>
 /// <param name="localizableString">Localizable string instance</param>
 /// <param name="localizationManager">Localization manager</param>
 /// <returns>Localized string</returns>
 public static string Localize(this ILocalizableString localizableString, ILocalizationManager localizationManager)
 {
     return(localizableString.Localize(new LocalizationContext(localizationManager)));
 }
예제 #5
0
        protected static string Localize(ILocalizableString str)
        {
            var lManager = StaticContext.IocManager.Resolve <ILocalizationManager>();

            return(str.Localize(lManager));
        }
예제 #6
0
 string __lang_str__(ILocalizableString display_name) => display_name?.Localize(this.stringLocalizerFactory)?.Value;